List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:com.fowlcorp.homebank4android.gui.PagerSwipeFragment.java
public static final PagerSwipeFragment newInstance(int position, Model model) { PagerSwipeFragment f = new PagerSwipeFragment(); Bundle bdl = new Bundle(2); bdl.putInt(ARG_SECTION_NUMBER, position); bdl.putSerializable(ARG_MODEL, model); f.setArguments(bdl);//w w w . j a v a2s. com return f; }
From source file:at.alladin.rmbt.android.terms.RMBTCheckFragment.java
public static RMBTCheckFragment newInstance(final CheckType checkType) { final RMBTCheckFragment f = new RMBTCheckFragment(); final Bundle bdl = new Bundle(1); bdl.putSerializable("checkType", checkType); f.setArguments(bdl);/* w ww. j a v a 2 s .c o m*/ return f; }
From source file:com.commonsware.android.fileseditor.EditorFragment.java
static EditorFragment newInstance(File fileToEdit) { EditorFragment frag = new EditorFragment(); Bundle args = new Bundle(); args.putSerializable(KEY_FILE, fileToEdit); frag.setArguments(args);/* ww w . j a v a 2s. c o m*/ return (frag); }
From source file:ch.ccapps.android.zeneggen.fragment.CarShareFragment.java
@NonNull public static CarShareFragment newInstance(HashMap<String, List<CarShareMobile>> carshares) { CarShareFragment fragment = new CarShareFragment(); Bundle b = new Bundle(); b.putSerializable(serialKey, carshares); fragment.setArguments(b);/*from w w w.j ava2 s . c o m*/ return fragment; }
From source file:com.google.samples.apps.topeka.view.quiz.QuizFragment.java
public static QuizFragment newInstance(Theme theme, FragmentViewCreatedListener lifecycleListener) { Bundle args = new Bundle(); args.putSerializable(KEY_THEME, theme); QuizFragment fragment = new QuizFragment(); fragment.setArguments(args);/*from w w w.j a v a2 s.c o m*/ fragment.lifecycleListener = lifecycleListener; return fragment; }
From source file:android.support.test.testapp.RecyclerViewFragment.java
/** * Factory method to create an instance of * {@link android.support.test.testapp.RecyclerViewFragment} * with a particular {@link android.support.v7.widget.RecyclerView.LayoutManager} * * @param layoutManagerType the layout manager to render the content * @return fragment instance// w w w .j a va 2 s . co m */ public static RecyclerViewFragment newInstance(LayoutManagerType layoutManagerType) { checkNotNull(layoutManagerType, "layoutManagerType cannot be null!"); RecyclerViewFragment recyclerViewFragment = new RecyclerViewFragment(); Bundle args = new Bundle(); args.putSerializable(KEY_EXTRA_LAYOUT_MANAGER_TYPE, layoutManagerType); recyclerViewFragment.setArguments(args); return recyclerViewFragment; }
From source file:ch.ccapps.android.zeneggen.fragment.HotelListFragment.java
@NonNull public static HotelListFragment newInstance(HashMap<String, List<Hotel>> hotels) { HotelListFragment fragment = new HotelListFragment(); Bundle b = new Bundle(); b.putSerializable("hotels", hotels); fragment.setArguments(b);/*from w w w . j a va 2 s . c o m*/ return fragment; }
From source file:ca.rmen.android.poetassistant.main.dictionaries.ResultListHeaderFragment.java
public static ResultListHeaderFragment newInstance(Tab tab) { Bundle arguments = new Bundle(1); arguments.putSerializable(EXTRA_TAB, tab); ResultListHeaderFragment fragment = new ResultListHeaderFragment(); fragment.setArguments(arguments);/* w ww . j a v a2 s . com*/ return fragment; }
From source file:com.coinomi.wallet.ui.EditAddressBookEntryFragment.java
private static EditAddressBookEntryFragment instance(@Nonnull CoinType type, @Nonnull final AbstractAddress address, @Nullable final String suggestedAddressLabel) { final EditAddressBookEntryFragment fragment = new EditAddressBookEntryFragment(); final Bundle args = new Bundle(); args.putString(KEY_COIN_ID, type.getId()); args.putSerializable(KEY_ADDRESS, address); args.putString(KEY_SUGGESTED_ADDRESS_LABEL, suggestedAddressLabel); fragment.setArguments(args);/*from www. ja v a2s . c om*/ return fragment; }
From source file:com.docd.purefm.ui.dialogs.PartitionInfoDialog.java
public static DialogFragment instantiate(final GenericFile file) { final Bundle args = new Bundle(); args.putSerializable(Extras.EXTRA_FILE, file); final PartitionInfoDialog d = new PartitionInfoDialog(); d.setArguments(args);/*from ww w. ja v a 2 s. c o m*/ return d; }