2
我在RelativeLayout
中有一個非常簡單的TableLayout
。其中一行包含一個設置爲「fill_width
」的微調器。在模擬器中,它看起來應該是這樣,但在我的手機上,它的左右兩側都是全寬的幾個像素。表格中的下一行填滿它們應該的位置。也嘗試將桌面上的微調移動到外面,但它沒有改變任何東西...Android微調器沒有真正填充寬度
任何人有任何提示?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0"
android:shrinkColumns="0"
>
<TableRow>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_span="3"
android:layout_marginTop="10dip"
android:text="@string/project_prompt"
/>
</TableRow>
<TableRow>
<Spinner
android:id="@+id/spinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_span="3"
android:prompt="@string/project_prompt"
/>
</TableRow>
<TableRow>
<Button
android:id="@+id/button_addproject"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
android:text="Ny"
android:onClick="selfDestruct"
/>
<Button
android:id="@+id/button_modifyproject"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
android:text="Rediger"
android:onClick="selfDestruct"
/>
<Button
android:id="@+id/button_deleteproject"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
android:text="Slett"
android:onClick="selfDestruct"
/>
</TableRow>
</TableLayout>
<Button
android:id="@+id/button_connect"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_centerInParent="true"
android:text="@string/connect"
/>
<ImageView
android:src="@drawable/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
/>
</RelativeLayout>
你可以發佈你的佈局XML嗎? ..我可以嘗試在我的設備上爲你.. – Joe