Я пытаюсь установить набор кнопок внутри ScrollView равным весу. Я попытался использовать следующий код, но он не работает. У кого-нибудь есть идеи, как установить одинаковый вес кнопок?
<LinearLayout android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="wrap_content">
<Button android:id="@+id/b1" android:text="@string/s1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<Button android:id="@+id/b2" android:text="@string/s2" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
<HorizontalScrollView android:id="@+id/HorizontalScrollView1" android:layout_height="fill_parent" android:fillViewport="true" android:layout_width="wrap_content">
<LinearLayout android:id="@+id/linearLayout2" android:layout_height="wrap_content" android:layout_width="wrap_content">
<Button android:id="@+id/bShortcut1" android:text="Button" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"></Button>
<Button android:id="@+id/bShortcut2" android:text="Button" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_weight="1"></Button>
<Button android:text="Button" android:id="@+id/bShortcut3" android:layout_weight="1" android:layout_height="wrap_content" android:layout_width="0dp"></Button>
<Button android:text="Button" android:layout_height="wrap_content" android:id="@+id/bShortcut31" android:layout_width="0dp" android:layout_weight="1"></Button>
<Button android:id="@+id/bShortcut4" android:text="Button" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content"></Button>
<Button android:id="@+id/bShortcut5" android:text="Button" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content"></Button>
<Button android:id="@+id/bShortcut6" android:text="Button" android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content"></Button>
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>