Bundle data = getIntent().getExtras(); Student student = (Student) data.getParcelable("student");
/** * Get selected user from results bundle * * @param arguments * @return user */ public static User getSelected(Bundle arguments) { return (User) arguments.getParcelable(ARG_SELECTED); }
/** * Get selected reference from results bundle * * @param arguments * @return user */ public static GitReference getSelected(Bundle arguments) { return (GitReference) arguments.getParcelable(ARG_SELECTED); }
Bundle b = this.getIntent().getExtras(); if (b != null) mCurrentListing = b.getParcelable(Constants.CUSTOM_LISTING);
@Override public void onRestoreInstanceState(Parcelable state) { Bundle bundle = (Bundle) state; stringState = bundle.getString("stringState"); beanState = bundle.getParcelable("beanState"); } }
@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; mSlideState = (PanelState) bundle.getSerializable(SLIDING_STATE); mSlideState = mSlideState == null ? DEFAULT_SLIDE_STATE : mSlideState; state = bundle.getParcelable("superState"); } super.onRestoreInstanceState(state); }
@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; this.roundedCorners = bundle.getBoolean(RoundableView.KEY); state = bundle.getParcelable(TAG); } super.onRestoreInstanceState(state); }
@Override public void onActivityCreated(Bundle savedInstanceState) { org = getArguments().getParcelable("org"); if (org == null && savedInstanceState != null) { org = savedInstanceState.getParcelable(EXTRA_USER); } setEmptyText(R.string.no_members); super.onActivityCreated(savedInstanceState); }
@Override protected void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; mCurrentTab = bundle.getInt("mCurrentTab"); state = bundle.getParcelable("instanceState"); if (mCurrentTab != 0 && mTabsContainer.getChildCount() > 0) { updateTabSelection(mCurrentTab); } } super.onRestoreInstanceState(state); }
@Override protected void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; mCurrentTab = bundle.getInt("mCurrentTab"); state = bundle.getParcelable("instanceState"); if (mCurrentTab != 0 && mTabsContainer.getChildCount() > 0) { updateTabSelection(mCurrentTab); } } super.onRestoreInstanceState(state); }
@Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { Context context = mContext.get(); if (context == null) { return null; } Album album = args.getParcelable(ARGS_ALBUM); if (album == null) { return null; } return AlbumMediaLoader.newInstance(context, album, album.isAll() && args.getBoolean(ARGS_ENABLE_CAPTURE, false)); }
public Bitmap getBigPicture() { if (RuntimeEnvironment.getApiLevel() >= Build.VERSION_CODES.N) { return realNotification.extras.getParcelable(Notification.EXTRA_PICTURE); } else { ImageView imageView = (ImageView) applyBigContentView().findViewById(getInternalResourceId("big_picture")); return imageView != null && imageView.getDrawable() != null ? ((BitmapDrawable) imageView.getDrawable()).getBitmap() : null; } }
@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; restoreState(bundle); state = bundle.getParcelable("superstate"); } super.onRestoreInstanceState(state); }
@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; restoreState(bundle); state = bundle.getParcelable("superstate"); } super.onRestoreInstanceState(state); }
@Override protected void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { Bundle bundle = (Bundle) state; mCurrentTab = bundle.getInt("mCurrentTab"); state = bundle.getParcelable("instanceState"); if (mCurrentTab != 0 && mTabsContainer.getChildCount() > 0) { updateTabSelection(mCurrentTab); scrollToCurrentTab(); } } super.onRestoreInstanceState(state); }
@Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); sharedPreferences = getActivity().getPreferences(Context.MODE_PRIVATE); setOrg((User) getArguments().getParcelable("org")); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle appData = getActivity().getIntent().getBundleExtra(APP_DATA); if (appData != null) { repository = appData.getParcelable(EXTRA_REPOSITORY); } }
@Override public void onActivityCreated(Bundle savedInstanceState) { if (getActivity() instanceof OrganizationSelectionProvider) { org = ((OrganizationSelectionProvider) getActivity()).addListener(this); } if (getArguments() != null && getArguments().containsKey("org")) { org = getArguments().getParcelable("org"); } if (org == null && savedInstanceState != null) { org = (User) savedInstanceState.get(EXTRA_USER); } super.onActivityCreated(savedInstanceState); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle args = getArguments(); base = args.getString(EXTRA_BASE); repository = args.getParcelable(EXTRA_REPOSITORY); mainSection.add(commitSection); mainSection.add(filesSection); mainSection.add(commentSection); adapter.add(mainSection); adapter.setOnItemClickListener(this); }
@Test public void addAccount_noActivitySpecified() throws Exception { shadowOf(am).addAuthenticator("google.com"); AccountManagerFuture<Bundle> result = am.addAccount("google.com", "auth_token_type", null, null, null, null, null); Bundle resultBundle = result.getResult(); assertThat((Intent) resultBundle.getParcelable(AccountManager.KEY_INTENT)).isNotNull(); }