Skip to content

Instantly share code, notes, and snippets.

@harshadura
Created June 27, 2013 17:25
Show Gist options
  • Save harshadura/5878451 to your computer and use it in GitHub Desktop.
Save harshadura/5878451 to your computer and use it in GitHub Desktop.
sdf
public void dialogOptionBuilder() throws IOException {
final CharSequence[] items = { getString(R.string.opdialog_rb_sinhala),
getString(R.string.opdialog_rb_tamil) };
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Select Your Mother Language");
builder.setSingleChoiceItems(items, getSelectedValue(),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
try {
settingsHandler.saveValues(option_key, item + "",
Tri_Bhasha_Learner_Activity.this);
dialog.dismiss();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
AlertDialog alert = builder.create();
alert.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment