Relative Content

Tag Archive for kotlinandroid-intentradio-buttonradio-groupandroid-viewbinding

How to display result depending on the radio button choice?

I’m working on an Android Studio activity in which I have to calculate area and perimeter. I used intent to pass and access variables that will be used in another activity where the computations will happen. What I want to happen is that when the user chooses or selects either the Perimeter or the Area radio buttons, the code with the specified calculations should run. The problem is that when I run my code, nothing displays following the user input. We are required to use view Binding in this activity so I’m not sure how I can use the isChecked() or isSelected() functions.