Android Dialog with Radio Buttons

Now we can see a easy example of how to use radio groups, actions, and radio buttons dialog in android mobiles.

Example for Android Dialog Radio Buttons :-

[sourcecode language="java"]
public class ExampleApp extends Activity {
protected void onCreate(Bundle savedInstanceState) {
final CharSequence[] PhoneModels = {"iPhone", "Nokia", "Android"};
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);

Android RadioButton Example

RadioButton is used to select any one option from the given group.

In Android by using RadioGroup only we can use RadioButton. We can add any number of RadioButtons to a single RadioGroup.

Syndicate content