Radio Button Demo

Radio Button Demo

This example shows how you can work with radio buttons. We are using Tablet environment for the same.

Algorithm:

1.) Create a new project by File-> New -> Android Project name it RadioButtonDemo.
2.) You will see some default code into your strings.xml and android manifest file.
3.) Write following code into your mail.xml

 

 

 

4.) Write following code into your strings.xml

 

 

 

5.) Build and run your code and check the output given below in the doc.

Steps:

1.) Create a project named RadioButtonDemo and set the information as stated in the image.

Build Target: Android 3.0
Application Name: RadioButtonDemo
Package Name: com.org. RadioButtonDemo
Activity Name: RadioButtonDemo
Min SDK Version: 11

2.) Open RadioButtonDemo.java file and write following code there:

 

 

 

3.) Compile and build the project.

4.) Run on 3.0 simulator for the output.

Output

Comments 2

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">