Skip to content

Instantly share code, notes, and snippets.

Created May 2, 2017 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/afc0c7095bd7d7e68140121b0bab62af to your computer and use it in GitHub Desktop.
Save anonymous/afc0c7095bd7d7e68140121b0bab62af to your computer and use it in GitHub Desktop.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater = getActivity().getLayoutInflater();
builder.setView(inflater.inflate(R.layout.dialog_info, null))
.setPositiveButton(R.string.info_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
InfoDialogFragment.this.getDialog().cancel();
}
});
return builder.create();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment