質問

How to make a button unclickable, except after checking a radio button?

役に立ちましたか?

解決

If the button is called myButton try using

myButton.setEnabled(false);

Then you can add some type of listener to your radio button and in that listener add

myButton.setEnabled(true);

Also, you can check out the android:clickable attribute in xml.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top