我想在偏好活動中有兩個偏好並排。一個例子是這樣的:Nebulander並排pref android
我想:
imagepref2.xml:
image 從壁紙得到
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="15dip"
android:paddingTop="15dip" >
<ImageView
android:id="@+id/thumb_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/img_1" />
<ImageView
android:id="@+id/thumb_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/img_2" >
</ImageView>
</LinearLayout>
但是,這顯示爲: this
您能解釋一下更多有關您的佈局的問題?我認爲結果完全符合您在佈局XML中定義的內容。 – nKn