は、私たちはこの絵のようなアンドロイドでラジオ・グループを設計することができますする方法を尋ねたいスタイルラジオ・グループは、Android
アイムこのようなデザインのXML:
<RadioGroup
android:layout_below="@+id/btnGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/rdiEasy"
android:text="EASY"
android:layout_alignParentLeft="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RadioButton
android:id="@+id/rdiMedium"
android:text="MEDIUM"
android:layout_marginRight="8dp"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/rdiHard"
android:text="HARD"
android:layout_alignParentLeft="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RadioButton
android:id="@+id/rdiHardest"
android:text="HARDEST"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RadioGroup>
RadioButtonGroupラップ2 RelativeLayoutを使用しています。各RelativeLayoutには2つのラジオボタンがあります。しかし、このデザインでは、ラジオボタンを1つしか選択できず、マルチラジオボタンを選択できます。誰も私にこのデザインのラジオボタンをデザインする方法を手伝ってもらうことができます。
は、(二のLinearLayoutを使用する選択されたかどうかを確認相対的なレイアウトではなく、縦向きのLinearLayout内で水平方向に移動します。 –
あなたの情報のためにRadioGroupにはRadioButtonが含まれている必要があります –
返信ありがとう、私はRadioGroupの選択モードでプロンプトを持っていることを意味します!私のコードで私はこのデザインを実装することができますが、1つのオプション(ラジオボタングループは機能しません)を選択することはできません – EddyLee