回答編集履歴
1
test
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
以下の方法でできるかと思います。
|
2
2
|
|
3
3
|
|
4
|
-
|
5
|
-
```lang-<ここに言語を入力>
|
6
4
|
|
7
5
|
int radioButtonID = radioButtonGroup.getCheckedRadioButtonId();
|
8
6
|
|
@@ -10,8 +8,6 @@
|
|
10
8
|
|
11
9
|
int idx = radioButtonGroup.indexOfChild(radioButton);
|
12
10
|
|
13
|
-
```
|
14
|
-
|
15
11
|
|
16
12
|
|
17
13
|
もし、RadioGroupにたとえばTextViewなど別のViewが含まれる場合、indexOfChild()メソッドは間違ったインデックスを返すので注意してください。
|