List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:com.appdynamics.demo.gasp.fragment.ReviewDialogFragment.java
public static ReviewDialogFragment newInstance(String title, Review review) { ReviewDialogFragment frag = new ReviewDialogFragment(); Bundle args = new Bundle(); args.putString("title", title); args.putSerializable("review", review); frag.setArguments(args);/*from ww w .j a va 2 s. co m*/ return frag; }
From source file:behsaman.storytellerandroid.ScreenSlidePageFragment.java
/** * Factory method for this fragment class. Constructs a new fragment for the given page number. *//*w ww.j a v a 2 s . c o m*/ public static ScreenSlidePageFragment create(PieceModel model, STORY_TYPE type, Context parentCon) { parentContext = parentCon; ScreenSlidePageFragment fragment = new ScreenSlidePageFragment(); Bundle args = new Bundle(); args.putSerializable(ARG_MODEL, model); args.putString(ARG_TYPE, type.toString()); fragment.setArguments(args); return fragment; }
From source file:Main.java
public static Bundle mapToBundle(Map<String, Serializable> map) { Bundle result = new Bundle(); if (map == null) return result; for (String key : map.keySet()) { result.putSerializable(key, map.get(key)); }// ww w . jav a2s . c om return result; }
From source file:augsburg.se.alltagsguide.start.LanguageFragment.java
public static LanguageFragment newInstance(Location location) { LanguageFragment fragment = new LanguageFragment(); Bundle args = new Bundle(); args.putSerializable(ARG_LOCATION, location); fragment.setArguments(args);// w ww.jav a 2s . c o m return fragment; }
From source file:Main.java
public static Bundle pack(@NonNull final Bundle bundle, @NonNull final String key, @Nullable final Serializable serializable) { if (serializable != null) { bundle.putSerializable(key, serializable); }/* www .j av a 2 s . c om*/ return bundle; }
From source file:com.connectsdk.smarthomesampler.fragment.SetupMediaFragment.java
public static Fragment newInstance(SceneConfig.DeviceConfig device) { SetupMediaFragment fragment = new SetupMediaFragment(); Bundle args = new Bundle(); args.putSerializable("device", device); fragment.setArguments(args);/*from w ww . j a v a2 s . c o m*/ return fragment; }
From source file:com.agna.setmaster.ui.screen.profile.setting.change.ChangeVolumeSettingDialog.java
public static <S extends ValuableSetting> ChangeVolumeSettingDialog newInstance(S settings, @ColorInt int accentColor) { ChangeVolumeSettingDialog dialog = new ChangeVolumeSettingDialog(); Bundle args = new Bundle(); args.putSerializable(EXTRA_SETTING, settings); args.putInt(EXTRA_ACCENT_COLOR, accentColor); dialog.setArguments(args);/* w w w .j a v a 2 s. c o m*/ return dialog; }
From source file:com.github.yuukis.businessmap.app.ContactsActionFragment.java
public static ContactsActionFragment newInstance(ContactsItem contact) { ContactsActionFragment fragment = new ContactsActionFragment(); Bundle args = new Bundle(); args.putSerializable(KEY_CONTACTS, contact); fragment.setArguments(args);//w w w . j a v a 2s .c o m return fragment; }
From source file:com.jwork.dhammapada.ContentFragment.java
public static Fragment newInstance(Chapter chapter, int verseIndex, String searchQuery) { LogUtility.getInstance().v(ContentFragment.class, "newInstance(" + chapter.getNo() + "|" + verseIndex + "|" + searchQuery + ")"); Bundle args = new Bundle(); args.putSerializable(KEY_VERSE_INDEX, verseIndex); args.putSerializable(KEY_CHAPTER_INDEX, chapter); if (searchQuery != null) { args.putSerializable(KEY_SEARCH_QUERY, searchQuery); }//from w w w . jav a2 s . co m ContentFragment myFragment = new ContentFragment(); myFragment.setArguments(args); return myFragment; }
From source file:com.chrynan.guitartuner.PitchFragment.java
public static PitchFragment newInstance(Note note) { PitchFragment fragment = new PitchFragment(); Bundle args = new Bundle(); args.putSerializable("note", note); fragment.setArguments(args);/* w ww .j a v a2 s.c om*/ return fragment; }