に基づいてUIを設定したいandroid:layout_weight
.Iは次のコード構造を持っています
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="25"
android:orientation="horizontal" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button1" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="25"
android:orientation="horizontal" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button1" />
</LinearLayout>
<ListView
android:id="@+id/relatedContent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="60dp"
android:layout_weight="50"
here=""
problem=""
android:cacheColorHint="@android:color/transparent"
android:divider="@drawable/divider"
android:listSelector="@drawable/listview_selector_color" >
</ListView>
すべてが正常に機能しますが、ListView id を設定すると、すべてのレイアウトがストレッチされます。