List of usage examples for android.support.v4.app DialogFragment show
public int show(FragmentTransaction transaction, String tag)
From source file:de.schildbach.wallet.ui.backup.RestoreWalletDialogFragment.java
public static void show(final FragmentManager fm) { final DialogFragment newFragment = new RestoreWalletDialogFragment(); newFragment.show(fm, FRAGMENT_TAG); }
From source file:de.schildbach.wallet.ui.backup.RestoreWalletFromExternalDialogFragment.java
public static void show(final FragmentManager fm, final Uri backupUri) { final DialogFragment newFragment = new RestoreWalletFromExternalDialogFragment(); final Bundle args = new Bundle(); args.putParcelable(KEY_BACKUP_URI, backupUri); newFragment.setArguments(args);//from w w w . ja va 2s. c o m newFragment.show(fm, FRAGMENT_TAG); }
From source file:com.ultramegasoft.flavordex2.dialog.ConfirmationDialog.java
/** * Show a confirmation dialog./*from w w w . jav a 2s .c o m*/ * * @param fm The FragmentManager to use * @param target The Fragment to notify of the result * @param requestCode A number to identify this request * @param title The dialog title * @param message The dialog message * @param icon Resource ID for the dialog icon * @param data An Intent to store additional data */ public static void showDialog(@NonNull FragmentManager fm, @Nullable Fragment target, int requestCode, @Nullable String title, @Nullable String message, int icon, @Nullable Intent data) { final DialogFragment fragment = new ConfirmationDialog(); fragment.setTargetFragment(target, requestCode); final Bundle args = new Bundle(); args.putString(ARG_TITLE, title); args.putString(ARG_MESSAGE, message); args.putInt(ARG_ICON, icon); args.putParcelable(ARG_DATA, data); fragment.setArguments(args); fragment.show(fm, TAG); }
From source file:com.achep.acdisplay.DialogHelper.java
private static void showDialog(@NonNull ActionBarActivity activity, @NonNull DialogFragment fragment, @NonNull String tag) {//from w ww . j a v a 2 s . c om Check.getInstance().isInMainThread(); FragmentManager fm = activity.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); Fragment prev = fm.findFragmentByTag(tag); if (prev != null) { ft.remove(prev); } ft.addToBackStack(null); fragment.show(ft, tag); }
From source file:com.achep.acdisplay.ui.DialogHelper.java
private static void showDialog(@NonNull AppCompatActivity activity, @NonNull DialogFragment fragment, @NonNull String tag) {// w w w. ja va2 s .c om Check.getInstance().isInMainThread(); FragmentManager fm = activity.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); Fragment prev = fm.findFragmentByTag(tag); if (prev != null) ft.remove(prev); ft.addToBackStack(null); fragment.show(ft, tag); }
From source file:dev.drsoran.moloko.util.UIUtils.java
public final static void showDialogFragment(FragmentActivity fragmentActivity, DialogFragment dialogFragment, String fragmentTag) {//from w ww . ja v a 2 s . c o m if (!isDialogFragmentAdded(fragmentActivity, fragmentTag)) dialogFragment.show(fragmentActivity.getSupportFragmentManager(), fragmentTag); }
From source file:com.grarak.kerneladiutor.utils.ViewUtils.java
public static void showDialog(FragmentManager manager, DialogFragment fragment) { FragmentTransaction ft = manager.beginTransaction(); Fragment prev = manager.findFragmentByTag("dialog"); if (prev != null) { ft.remove(prev);/*from w w w. java 2s .c o m*/ } ft.addToBackStack(null); fragment.show(ft, "dialog"); }
From source file:com.ultramegasoft.flavordex2.dialog.CatDeleteDialog.java
/** * Show the confirmation dialog to delete a category. * * @param fm The FragmentManager to use * @param target The Fragment to send the result to * @param requestCode The code to identify the request * @param catId The database ID for the category *///from ww w. j a v a 2 s.co m public static void showDialog(@NonNull FragmentManager fm, @Nullable Fragment target, int requestCode, long catId) { if (catId > 0) { final DialogFragment fragment = new CatDeleteDialog(); fragment.setTargetFragment(target, requestCode); final Bundle args = new Bundle(); args.putLong(ARG_CAT_ID, catId); fragment.setArguments(args); fragment.show(fm, TAG); } }
From source file:de.schildbach.wallet.ui.ReportIssueDialogFragment.java
public static void show(final FragmentManager fm, final int titleResId, final int messageResId, final String subject, final String contextualData) { final DialogFragment newFragment = new ReportIssueDialogFragment(); final Bundle args = new Bundle(); args.putInt(KEY_TITLE, titleResId);//from w w w . j a va 2s. com args.putInt(KEY_MESSAGE, messageResId); args.putString(KEY_SUBJECT, subject); args.putString(KEY_CONTEXTUAL_DATA, contextualData); newFragment.setArguments(args); newFragment.show(fm, FRAGMENT_TAG); }
From source file:com.ultramegasoft.flavordex2.dialog.AppChooserDialog.java
/** * Show the dialog./*from w ww. ja v a 2 s . com*/ * * @param fm The FragmentManager to use * @param multiChoice Whether to allow multiple selections */ public static void showDialog(@NonNull FragmentManager fm, boolean multiChoice) { final DialogFragment fragment = new AppChooserDialog(); final Bundle args = new Bundle(); args.putBoolean(ARG_MULTI_CHOICE, multiChoice); fragment.setArguments(args); fragment.show(fm, TAG); }