List of usage examples for android.os Bundle putParcelable
public void putParcelable(@Nullable String key, @Nullable Parcelable value)
From source file:com.cerema.cloud2.ui.dialog.UploadSourceDialogFragment.java
public static UploadSourceDialogFragment newInstance(Account account) { UploadSourceDialogFragment f = new UploadSourceDialogFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_ACCOUNT, account); f.setArguments(args);// w w w . j a v a 2s . c o m return f; }
From source file:com.maskyn.fileeditorpro.dialogfragment.FileInfoDialog.java
public static FileInfoDialog newInstance(Uri uri) { final FileInfoDialog f = new FileInfoDialog(); final Bundle args = new Bundle(); args.putParcelable("uri", uri); f.setArguments(args);//from ww w .j a va 2 s . c om return f; }
From source file:Main.java
public static <T> void putBundle(String key, T data, Intent intent) { Bundle bundle = new Bundle(); try {/*w ww . java 2 s.co m*/ if (data instanceof Parcelable) { bundle.putParcelable(key, (Parcelable) data); } else if (data instanceof Serializable) { bundle.putSerializable(key, (Serializable) data); } intent.putExtras(bundle); } catch (Exception e) { e.printStackTrace(); } }
From source file:com.cerema.cloud2.ui.dialog.SharePasswordDialogFragment.java
/** * Public factory method to create new SharePasswordDialogFragment instances. * * @param file OCFile bound to the public share that which password will be set or updated * @param createShare When 'true', the public share will be created; when 'false', will be assumed * that the public share already exists, and its state will be directly updated. * @return Dialog ready to show. *//*from w ww. j a v a2 s .c om*/ public static SharePasswordDialogFragment newInstance(OCFile file, boolean createShare) { SharePasswordDialogFragment frag = new SharePasswordDialogFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_FILE, file); args.putBoolean(ARG_CREATE_SHARE, createShare); frag.setArguments(args); return frag; }
From source file:com.arconus.dicecommander.ui.dialogs.PowerRollResultDialog.java
public static PowerRollResultDialog newInstance(CharPowerRollResult roll) { PowerRollResultDialog f = new PowerRollResultDialog(); // Supply num input as an argument. Bundle args = new Bundle(); args.putParcelable("roll", roll); f.setArguments(args);// w w w. ja v a 2s. c om return f; }
From source file:com.cerema.cloud2.ui.dialog.CreateFolderDialogFragment.java
/** * Public factory method to create new CreateFolderDialogFragment instances. * * @param parentFolder Folder to create * @return Dialog ready to show. */// www . j a v a2 s.c o m public static CreateFolderDialogFragment newInstance(OCFile parentFolder) { CreateFolderDialogFragment frag = new CreateFolderDialogFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_PARENT_FOLDER, parentFolder); frag.setArguments(args); return frag; }
From source file:butter.droid.fragments.MediaGenreSelectionFragment.java
public static MediaGenreSelectionFragment newInstance(MediaProvider provider, Listener listener) { MediaGenreSelectionFragment frag = new MediaGenreSelectionFragment(); Bundle args = new Bundle(); args.putParcelable(EXTRA_PROVIDER, provider); frag.setArguments(args);/*from w w w . j ava 2 s . co m*/ frag.setListener(listener); return frag; }
From source file:at.bitfire.davdroid.ui.ExceptionInfoFragment.java
public static ExceptionInfoFragment newInstance(@NonNull Exception exception, Account account) { ExceptionInfoFragment frag = new ExceptionInfoFragment(); Bundle args = new Bundle(1); args.putSerializable(ARG_EXCEPTION, exception); args.putParcelable(ARG_ACCOUNT, account); frag.setArguments(args);// w w w . java2 s.c o m return frag; }
From source file:com.cerema.cloud2.ui.dialog.RenameFileDialogFragment.java
/** * Public factory method to create new RenameFileDialogFragment instances. * /*from w w w .j a va2 s .c o m*/ * @param file File to rename. * @return Dialog ready to show. */ public static RenameFileDialogFragment newInstance(OCFile file) { RenameFileDialogFragment frag = new RenameFileDialogFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_TARGET_FILE, file); frag.setArguments(args); return frag; }
From source file:com.acbelter.directionalcarousel.page.PageFragment.java
public static Bundle createArgs(int pageLayoutId, Parcelable item) { Bundle args = new Bundle(); args.putInt("page_layout_id", pageLayoutId); args.putParcelable("item", item); return args;//from ww w. j av a2s.c o m }