Я хочу добавить кнопку, центрированную под двумя радиосвязными переключателями B, и когда я проверил опцию и нажимаю на подтверждение, действие будет выполнено. Любая помощь пожалуйста
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();