dpを指定せずにラジオボタンを自動的に整列させたいのですが、どうすればいいですか?ボタンを自動的に整列する方法
以下の例では、ラジオボタンの幅80と高さ70が設定されています。代わりに、fill_parentやwrap_contentのようにしたいと思います。どのようにできるのか?
<RadioGroup android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:checkedButton="@+id/allcontacts"
android:id="@+id/contactgroup">
<RadioButton android:id="@+id/allcontacts"
android:width="80dip"
android:height="70dip"/>
<RadioButton android:id="@+id/categories"
android:width="80dip" android:height="70dip" />
<RadioButton android:id="@+id/favourites"
android:width="80dip" android:height="70dip" />
固定サイズを適用する代わりに、 'wrap_content'を適用してください。 – RobinHood
「整列したい」と言っているのではなく、どのように整列したいかを言う... – JoxTraex
これらのボタンをすべて水平方向に整列させたい。私はdpで高さと幅を指定しないでこれを望みます – Naruto