List of usage examples for android.app AlertDialog.Builder AlertDialog.Builder
public Builder(Context context, int themeResId)
From source file:org.godotengine.godot.auth.FacebookSignIn.java
public void askForPermission(final String title, final String message, final String perm, final boolean read) { new AlertDialog.Builder(activity, AlertDialog.THEME_HOLO_LIGHT) .setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override/*from w ww . j a va2 s. c o m*/ public void onClick(DialogInterface dialog, int id) { if (!read) { requestPublishPermissions(Arrays.asList(perm)); } else { requestReadPermissions(Arrays.asList(perm)); } } }).setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }).setTitle(title).setMessage(message).show(); }