List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:com.grayfox.android.app.fragment.FriendProfileFragment.java
public static FriendProfileFragment newInstance(User friend) { FriendProfileFragment fragment = new FriendProfileFragment(); Bundle args = new Bundle(); args.putSerializable(FRIEND_ARG, friend); fragment.setArguments(args);/*from w w w .j a v a 2 s .c o m*/ return fragment; }
From source file:at.bitfire.davdroid.ui.setup.AccountDetailsFragment.java
public static AccountDetailsFragment newInstance(DavResourceFinder.Configuration config) { AccountDetailsFragment frag = new AccountDetailsFragment(); Bundle args = new Bundle(1); args.putSerializable(KEY_CONFIG, config); frag.setArguments(args);/*ww w .j a v a 2s . co m*/ return frag; }
From source file:Main.java
public static <T> void putBundle(String key, T data, Intent intent) { Bundle bundle = new Bundle(); try {/* www .ja va 2s.c om*/ 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.by_syk.lib.nanoiconpack.fragment.IconsFragment.java
public static IconsFragment newInstance(int id, IconsGetter iconsGetter, int mode) { IconsFragment fragment = new IconsFragment(); Bundle bundle = new Bundle(); bundle.putInt("pageId", id); bundle.putSerializable("iconsGetter", iconsGetter); bundle.putInt("mode", mode); fragment.setArguments(bundle);//w w w .j ava 2 s . co m return fragment; }
From source file:fr.julienvermet.bugdroid.ui.BugCommentsFragment.java
public static BugCommentsFragment newInstance(Bug bug) { BugCommentsFragment fragment = new BugCommentsFragment(); Bundle args = new Bundle(); args.putSerializable(BUG, bug); fragment.setArguments(args);/*from ww w .ja v a 2s. c o m*/ return fragment; }
From source file:com.gh4a.fragment.ContentListFragment.java
public static ContentListFragment newInstance(Repository repository, String path, ArrayList<RepositoryContents> contents, String ref) { ContentListFragment f = new ContentListFragment(); Bundle args = new Bundle(); args.putString(Constants.Object.PATH, path); args.putString(Constants.Object.REF, ref); args.putSerializable("REPOSITORY", repository); args.putSerializable("CONTENTS", contents); f.setArguments(args);/*from w ww . java2 s . co m*/ return f; }
From source file:com.misczak.joinmybridge.EventFragment.java
public static EventFragment newInstance(long calendarId) { Bundle args = new Bundle(); args.putSerializable("calendarId", calendarId); EventFragment fragment = new EventFragment(); fragment.setArguments(args);//from w w w . j a v a 2 s. c o m return fragment; }
From source file:com.example.multiframe.ScansActivity.java
public static ScansActivity newInstance(String code) { Bundle args = new Bundle(); args.putSerializable(EXTRA_CODE, code); ScansActivity fragment = new ScansActivity(); fragment.setArguments(args);/*from w w w. j a v a2 s . c o m*/ return fragment; }
From source file:com.QuarkLabs.BTCeClient.fragments.HistoryFragment.java
public static HistoryFragment newInstance(ListType historyType) { if (historyType == ListType.ActiveOrders) { throw new IllegalArgumentException("ActiveOrders type is not supported by this Fragment"); }/* w ww .j av a 2 s. c om*/ Bundle bundle = new Bundle(); bundle.putSerializable(mListTypeTag, historyType); HistoryFragment myFragment = new HistoryFragment(); myFragment.setArguments(bundle); return myFragment; }
From source file:com.fowlcorp.homebank4android.gui.AccountFragment.java
public static AccountFragment newInstance(int position, Model model, int displayValue) { AccountFragment f = new AccountFragment(); Bundle bdl = new Bundle(3); bdl.putInt(ARG_DISPLAY_VALUE, displayValue); bdl.putInt(ARG_SECTION_NUMBER, position); bdl.putSerializable(ARG_MODEL, model); f.setArguments(bdl);/*w ww . j av a2 s . co m*/ return f; }