문제

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