Showing posts with label RadioButton. Show all posts
Showing posts with label RadioButton. Show all posts

Android RadioButton Example


In this tutorial you will learn how to create a RadioButton, which allows user to choose one of several options. Putting multiple RadioButton elements in one container makes it impossible to choose more than one option, which means that when user toggles one button it automatically cancels the previous one. There is only two things that you will need to do to have a RadioButton element in your application: 1. Add RadioButton element to xml layout file and 2. Add onClick() event handler to your activity class.