I want to add a button centered below the two radio second radio button B and when i checked an option and click on validate, an action take place. Any help please
final CharSequence[] photo = {"A","B"};
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Select Gender");
alert.setSingleChoiceItems(photo,-1, new
DialogInterface.OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
if(photo[which]=="A")
{
gen="B";
}
else if (photo[which]=="B")
{
gen="B";
}
}
});
alert.show();