私はオプションmeasureWithLargestChild="true"
で遊んでいます。私のボタンの1つに大きすぎるテキストがあると、なぜ私のレイアウトが壊れたのか分かりません。私はそれが1/3の基本的なサイズを保つべきだと思うが、彼らは1/6くらい小さくなる。何故ですか?measureWithLargestChildを理解する:なぜレイアウトが壊れるのですか?
はここに私のxmlです:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:baselineAligned="false"
android:gravity="center"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:measureWithLargestChild="true" >
<Button
style="@style/my_style"
android:layout_weight="1"
android:text="Button123456" />
<Button
style="@style/my_style"
android:layout_weight="1"
android:text="A" />
<Button
style="@style/my_style"
android:layout_weight="1"
android:text="WW" />
</LinearLayout>
</LinearLayout>
誰かがケース2(4件のうち)で収縮した理由を説明してもらえますか?この場合、どのようにスペースがありませんか? – Diffy