RadioButton


 

  1. Static RadioButton
  2. Dynamic RadioButton
  3. RadioButton Enable Diable

 

1. Static RadioButton

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 : Open AndroidManifest.xml and add following code :

ScreenShot:

radiobtn radiobtn2 radiobtn3

Download SourceCode

 

2. Dynamic RadioButton

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open src -> package -> MainActivity.java and add following code :

Step 3 : Open AndroidManifest.xml and add following code :

ScreenShot:

dy_radiobtn dy_radiobtn2 dy_radiobtn3

Download SourceCode

 

3. RadioButton Enable Disable

Step 1 : Select File -> New -> Project -> Android Application Project. Fill the forms, create “Blank Activity” and click “Finish” button.

Step 2 : Open res -> layout -> activity_main.xml and add following code :

Step 3 : Open src -> package -> MainActivity.java and add following code :

Step 4 :Open AndroidManifest.xml and add following code :

Step 5 : Open build.gradle(Module: app) and add following code :

ScreenShot:

 RadioButtonEnableDisable_enableRadioButtonEnableDisable_disable

Download SourceCode