Course Content

  • Android - UI RadioButton Control

Course Content


Add the android:onClick property to the RadioButton> element in your XML layout to specify the button's click event handler. The name of the method you wish to invoke in response to a click event must be the value for this property. The method must then be implemented in the Activity that hosts the layout.

The RadioButton is a two-state button that may be checked or unchecked. We may click a single unchecked radio button to make it a checked radio button. A radio button that has been checked cannot be unchecked by the user. RadioButton is frequently used in conjunction with RadioGroup.

When a user must choose exactly one option from a list of two or more mutually incompatible possibilities, radio buttons are utilised. In other words, selecting a non-selected radio button would deselect any other button in the list that was previously chosen.

Radio buttons get their name from the fact that they work similarly to radio channel presets. A standard set of radio buttons. A set of radio buttons functions as if they were a single control. The Tab key can only be used to access the currently chosen option; however, the arrow keys can be used to cycle between the group.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere