Skip to content

Instantly share code, notes, and snippets.

@benjgorman
Created September 26, 2011 22:14
Show Gist options
  • Save benjgorman/1243560 to your computer and use it in GitHub Desktop.
Save benjgorman/1243560 to your computer and use it in GitHub Desktop.
Android Dialog
final Button button6 = (Button) findViewById(R.id.btn_addRAddress);
button6.setOnClickListener(new View.OnClickListener() {
public void onClick(View v)
{
Context mContext = v.getContext();
final Dialog dialog = new Dialog(mContext);
dialog.setContentView(R.layout.add_address);
dialog.setTitle("Add Address");
final Button button9 = (Button) findViewById(R.id.btn_cancel_add);
button9.setOnClickListener(new View.OnClickListener() {
public void onClick(View v)
{
dialog.dismiss();
}
});
dialog.show();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment