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