List of usage examples for android.os Bundle getSerializable
@Override
@Nullable
public Serializable getSerializable(@Nullable String key)
From source file:com.github.mobile.ui.comment.RenderedCommentFragment.java
@Override public Loader<CharSequence> onCreateLoader(int loader, Bundle args) { final CharSequence raw = args.getCharSequence(ARG_TEXT); final IRepositoryIdProvider repo = (IRepositoryIdProvider) args.getSerializable(ARG_REPO); return new MarkdownLoader(getActivity(), repo, raw.toString(), imageGetter, true); }
From source file:com.github.mobile.ui.issue.SearchIssueListFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle appData = getActivity().getIntent().getBundleExtra(APP_DATA); if (appData != null) repository = (Repository) appData.getSerializable(EXTRA_REPOSITORY); }
From source file:com.vinson.jingwen.NewsListFragment.java
@Nullable @Override/* w w w .ja va 2 s . c o m*/ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Bundle bundle = getArguments(); Channels.Channel channel = (Channels.Channel) bundle.getSerializable("channel"); rv = (RecyclerView) inflater.inflate(R.layout.fragment_cheese_list, container, false); getNewsInfo(channel.channelId, channel.name); return rv; }
From source file:com.jaspersoft.android.jaspermobile.dialog.DeleteDialogFragment.java
@Override protected void initDialogParams() { super.initDialogParams(); Bundle args = getArguments(); if (args != null) { if (args.containsKey(RESOURCE_ARG)) { mResource = (JasperResource) args.getSerializable(RESOURCE_ARG); }/* w w w . j a va 2 s. c o m*/ } }
From source file:com.github.mobile.ui.issue.IssueSearchActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.issue_search); setSupportActionBar((android.support.v7.widget.Toolbar) findViewById(R.id.toolbar)); ActionBar actionBar = getSupportActionBar(); Bundle appData = getIntent().getBundleExtra(APP_DATA); if (appData != null) { repository = (Repository) appData.getSerializable(EXTRA_REPOSITORY); if (repository != null) { actionBar.setSubtitle(repository.generateId()); actionBar.setDisplayHomeAsUpEnabled(true); }//w ww . j av a 2 s . c om } avatars.bind(actionBar, repository.getOwner()); issueFragment = (SearchIssueListFragment) getSupportFragmentManager().findFragmentById(android.R.id.list); handleIntent(getIntent()); }
From source file:de.zell.android.util.fragments.EntityListFragment.java
/** * Restores the entity list from the given bundle with the given key. * // w w w . j ava2 s .c om * @param savedInstanceState the bundle which should contain the entity array * @param key the key which identifies the entity array in the bundle */ private void restoreEntities(Bundle savedInstanceState, String key) { Entity[] e = (Entity[]) savedInstanceState.getSerializable(key); if (e != null) { entities = Arrays.asList(e); } }
From source file:at.bitfire.davdroid.ui.DeleteCollectionFragment.java
@Override public Loader<Exception> onCreateLoader(int id, Bundle args) { account = args.getParcelable(ARG_ACCOUNT); collectionInfo = (CollectionInfo) args.getSerializable(ARG_COLLECTION_INFO); return new DeleteCollectionLoader(getContext(), account, collectionInfo); }
From source file:ch.scythe.hsr.DayFragment.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle arguments = getArguments(); if (arguments != null) { week = (UiWeek) (arguments.getSerializable(FRAGMENT_PARAMETER_DATA)); weekDay = (Weekday) (arguments.getSerializable(FRAGMENT_PARAMETER_WEEKDAY)); }//ww w . j av a 2 s .c o m }
From source file:com.eugene.fithealthmaingit.UI.Dialogs.FragmentSuggestionDialog.java
@NonNull @Override/*from w w w .jav a 2 s . com*/ public Dialog onCreateDialog(Bundle savedInstanceState) { sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity()); Bundle bundle = this.getArguments(); if (bundle != null) { mMealType = bundle.getString(Globals.MEAL_TYPE); mDate = (Date) bundle.getSerializable(Globals.SUGGESTION_DATE); } v = getActivity().getLayoutInflater().inflate(R.layout.dialog_fragment_suggestion, null); findViews(); // alert Dialog builder implementation AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setView(v); builder.setNegativeButton("Done", null); return builder.create(); }
From source file:com.redbooth.projectnevada.CardFragment.java
private void configureCardView(Bundle savedInstanceState) { if (savedInstanceState != null && savedInstanceState.containsKey(KEY_INITIAL_MODEL)) { storedModel = (CardViewModel) savedInstanceState.getSerializable(KEY_INITIAL_MODEL); }// w ww . j av a2 s. c o m if (storedModel == null) { storedModel = new CardViewModel(); } cardView.setCard(storedModel); cardView.setOnCardViewStatusChangeListener(cardStatusChangeListener); }