user3098538
user3098538

Reputation: 1201

Android how to make option selection with radio button

I want to make options select design with two radio buttons selections. Like image below. Please help to do this.

enter image description here

Upvotes: 0

Views: 763

Answers (1)

SKT
SKT

Reputation: 1851

        AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
        builder.setSingleChoiceItems(new CharSequence[] {"Item1", "Item2"}, 0, new DialogInterface.OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                // TODO Auto-generated method stub

            }
        });
        builder.create().show();

Here you can create a dialog with radio button and text

Upvotes: 1

Related Questions