List of usage examples for android.support.v4.app DialogFragment setArguments
public void setArguments(Bundle args)
From source file:com.artemchep.horario.ui.DialogHelper.java
public static void showSubjectLocalDialog(@NonNull AppCompatActivity activity, @NonNull Bundle args) { DialogFragment fragment = new SubjectDialog(); fragment.setArguments(args); showDialog(activity, fragment, TAG_FRAGMENT_SUBJECT); }
From source file:de.dreier.mytargets.features.settings.DatePreferenceDialogFragmentCompat.java
@NonNull public static DialogFragment newInstance(String key) { DialogFragment dialogFragment = new DatePreferenceDialogFragmentCompat(); Bundle bundle = new Bundle(1); bundle.putString("key", key); dialogFragment.setArguments(bundle); return dialogFragment; }
From source file:uk.ac.horizon.aestheticodes.dialogs.IntDialogFragment.java
public static void create(FragmentManager fragmentManager, String propertyName) { DialogFragment newFragment = new IntDialogFragment(); Bundle bundle = new Bundle(); bundle.putString("propertyName", propertyName); newFragment.setArguments(bundle); newFragment.show(fragmentManager, "IntDialog"); }
From source file:net.wespot.pim.utils.layout.InquiryDialogFragment.java
public static DialogFragment newInstance() { DialogFragment frag = new InquiryDialogFragment(); Bundle args = new Bundle(); // args.putInt("title", title); frag.setArguments(args); return frag;//from w w w. j a va 2s.c om }
From source file:uk.ac.horizon.aestheticodes.dialogs.IntRangeDialogFragment.java
public static void create(FragmentManager fragmentManager, String minProperty, String maxProperty) { DialogFragment newFragment = new IntRangeDialogFragment(); Bundle bundle = new Bundle(); bundle.putString("minProperty", minProperty); bundle.putString("maxProperty", maxProperty); newFragment.setArguments(bundle); newFragment.show(fragmentManager, "IntDialog"); }
From source file:com.ultramegasoft.flavordex2.dialog.MessageDialog.java
/** * Show a confirmation dialog.//w w w . ja v a 2 s . c o m * * @param fm The FragmentManager to use * @param title The dialog title * @param message The dialog message * @param icon Resource ID for the dialog icon */ public static void showDialog(@NonNull FragmentManager fm, @NonNull String title, @NonNull String message, int icon) { final DialogFragment fragment = new MessageDialog(); final Bundle args = new Bundle(); args.putString(ARG_TITLE, title); args.putString(ARG_MESSAGE, message); args.putInt(ARG_ICON, icon); fragment.setArguments(args); fragment.show(fm, TAG); }
From source file:com.gdglapaz.gdgbo.GooglePlusErrorDialogFragment.java
/** * Create a {@link DialogFragment} for displaying the {@link GooglePlusUtil#getErrorDialog}. * @param errorCode The error code returned by * {@link GooglePlusUtil#checkGooglePlusApp(android.content.Context)} * @param requestCode The request code for resolving the resolution activity. * @return The {@link DialogFragment}.//from www. ja v a2s .c o m */ public static DialogFragment create(int errorCode, int requestCode) { DialogFragment fragment = new GooglePlusErrorDialogFragment(); Bundle args = new Bundle(); args.putInt(GooglePlusErrorDialogFragment.ARG_ERROR_CODE, errorCode); args.putInt(GooglePlusErrorDialogFragment.ARG_REQUEST_CODE, requestCode); fragment.setArguments(args); return fragment; }
From source file:nz.ac.otago.psyanlab.common.designer.subject.EditQuestionDialogueFragment.java
public static DialogFragment newDialogue(long questionId, boolean isNew) { DialogFragment f = newDialogue(questionId); Bundle args = f.getArguments();/*from ww w. j a v a 2s . c o m*/ args.putBoolean(ARG_IS_NEW, isNew); f.setArguments(args); return f; }
From source file:org.andstatus.app.util.DialogFactory.java
public static void showYesCancelDialog(Fragment fragment, int titleId, int messageId, final ActivityRequestCode requestCode) { DialogFragment dialog = new YesCancelDialog(); Bundle args = new Bundle(); args.putCharSequence(DIALOG_TITLE_KEY, fragment.getText(titleId)); args.putCharSequence(DIALOG_MESSAGE_KEY, fragment.getText(messageId)); dialog.setArguments(args); dialog.setTargetFragment(fragment, requestCode.id); dialog.show(fragment.getFragmentManager(), YES_CANCEL_DIALOG_TAG); }
From source file:org.andstatus.app.util.DialogFactory.java
/** See http://stackoverflow.com/questions/10285047/showdialog-deprecated-whats-the-alternative */ public static void showOkDialog(Fragment fragment, int titleId, int messageId, final int requestCode) { DialogFragment dialog = new OkDialogFragment(); Bundle args = new Bundle(); args.putCharSequence(DIALOG_TITLE_KEY, fragment.getText(titleId)); args.putCharSequence(DIALOG_MESSAGE_KEY, fragment.getText(messageId)); dialog.setArguments(args); dialog.setTargetFragment(fragment, requestCode); dialog.show(fragment.getFragmentManager(), OK_DIALOG_TAG); }