RadioButton

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 {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final CharSequence[] PhoneModels = {"iPhone", "Nokia", "Android"};
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
alt_b

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