How to Handle the checkbox ischecked and unchecked event in android

后端 未结 5 1621
慢半拍i
慢半拍i 2021-01-16 02:11

i am new in android.i make a simple maths apps. i use the check box for select right option but problem is here the answer option is not only one but also two,three means

5条回答
  •  一向
    一向 (楼主)
    2021-01-16 02:46

    What's wrong is your if condition. It should be:

    if( isChecked ) 
    

    and not

    if( chk.isChecked() )
    

提交回复
热议问题