0
Android studio kotlin code
Guys, this function is unable to read rb_aligator. idk why. I have named that as an id to a RadioButton. Please help fun onclick(view: View){ if (view == rb_aligator) }
1 Réponse
0
You a comparing a View to a radio button that holds a Boolean. To simplify it better, you have to do a condition to the radio buttons in order to work. You can do the "if-else" or the efficient way is use "when()" and putting a boolean condition or Int to it.