レイアウトには 2 つのボタンがあり、大画面デバイス (タブレット) では、ばかげて見えないように幅を制限したいと考えています。maxWidth 属性を使用することを期待していましたが、私のシナリオでは明らかに何もしません。レイアウトの定義は次のとおりです。ボタンは maxWidth の値を無視して、レイアウトの幅全体を使用します。
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxWidth="100dp"
android:text="Button 1"
/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxWidth="100dp"
android:text="Button 2"
/>
</LinearLayout>
なぜ、そしてどのようにこの (明らかにクレイジーな) 制限を回避するのですか?