我想顯示下面Item.I時遇到其在不同填充偶數和列表視圖中的文本字段中的文本字段持續時間奇數行。但事情是我想要兩個文本字段並行到圖像我想要垂直顯示,但是當我把兩個文本字段放在垂直佈局時它顯示錯誤。如何以垂直方式顯示兩個文本字段。對不起,如果我的英語有任何錯誤。提前致謝。
下面是我的代碼:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/gender_image"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="39.5"
android:contentDescription="@string/app_name"
android:src="@drawable/male" />
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="60"
android:gravity="center"
android:textColor="@android:color/holo_green_dark" />
<TextView
android:id="@+id/name1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="60"
android:gravity="center"
android:textColor="@android:color/holo_green_light" />
</LinearLayout>
看看這個:http://stackoverflow.com/questions/1258275/vertical-rotated-label-in-android/7855852#7855852 –
感謝你的鏈接。 – Praveenkumar