List of usage examples for android.os Bundle putParcelableArrayList
public void putParcelableArrayList(@Nullable String key, @Nullable ArrayList<? extends Parcelable> value)
From source file:org.amahi.anywhere.fragment.ServerSharesFragment.java
private void tearDownSharesState(Bundle state) { if (areSharesLoaded()) { state.putParcelableArrayList(State.SHARES, new ArrayList<Parcelable>(getSharesAdapter().getItems())); }/* ww w . ja v a 2 s.c om*/ }
From source file:se.tmeit.app.ui.members.MemberInfoFragment.java
public static MemberInfoFragment createInstance(Context context, Member member, Member.RepositoryData memberRepository) { Bundle bundle = new Bundle(); bundle.putString(Member.Keys.USERNAME, member.username()); bundle.putString(Member.Keys.REAL_NAME, member.realName()); bundle.putString(Member.Keys.TITLE_TEXT, member.titleText(context, memberRepository)); bundle.putString(Member.Keys.TEAM_TEXT, member.teamText(context, memberRepository)); bundle.putString(Member.Keys.PHONE, member.phone()); bundle.putString(Member.Keys.EMAIL, member.email()); bundle.putStringArrayList(Member.Keys.FACES, new ArrayList<>(member.faces())); bundle.putString(Member.Keys.FLAGS, getDescriptionOfFlags(context, member)); bundle.putString(Member.Keys.DATE_PRAO, member.datePrao()); bundle.putString(Member.Keys.DATE_MARSKALK, member.dateMarskalk()); bundle.putString(Member.Keys.DATE_VRAQ, member.dateVraq()); bundle.putInt(Member.Keys.EXPERIENCE_POINTS, member.experiencePoints()); bundle.putParcelableArrayList(Member.Keys.EXPERIENCE_BADGES, new ArrayList<>(member.experienceBadges())); MemberInfoFragment instance = new MemberInfoFragment(); instance.setArguments(bundle);//from w w w.ja v a 2 s .c om return instance; }
From source file:com.burhan.udacity.popularmovies.ui.fragment.MoviesFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelableArrayList(STATE_MOVIES, new ArrayList<>(mMoviesAdapter.getItems())); outState.putInt(STATE_SELECTED_POSITION, mSelectedPosition); }
From source file:com.example.droidcodin.popularmdb.MovieFragment.java
@Override public void onSaveInstanceState(Bundle outState) { outState.putParcelableArrayList("movies", (ArrayList) movieList); super.onSaveInstanceState(outState); }
From source file:de.gruenewald.udacity.spotifystreamer.ArtistFragment.java
/** * This method is called when the activity is paused/restarted (e.g. on rotation). * It can be used to persist data in a {@link Bundle} which is then passed to the onCreate() * method.//from w w w.j a v a 2 s . c om * * @param outState The {@link Bundle} object to store the information. */ @Override public void onSaveInstanceState(Bundle outState) { // save the existing list so that it can be restored outState.putInt(KEY_ARTLIST_POSITION, mArtlistPosition); outState.putParcelableArrayList(KEY_ARTLIST_ENTRIES, mArtistListEntries); super.onSaveInstanceState(outState); }
From source file:com.lloydtorres.stately.census.CensusSubFragment.java
@Override public void onSaveInstanceState(Bundle outState) { // Save state super.onSaveInstanceState(outState); outState.putInt(MODE_KEY, censusMode); if (censusData != null) { outState.putParcelableArrayList(CENSUS_DATA_KEY, censusData); }/*from ww w . ja va2 s . c o m*/ if (target != null) { outState.putString(TARGET_KEY, target); } }
From source file:fr.cph.chicago.activity.BaseActivity.java
/** * Finish current activity and start main activity with custom transition * /*from ww w. j av a2 s . com*/ * @param trainArrivals * the train arrivals * @param busArrivals * the bus arrivals */ private void startMainActivity(SparseArray<TrainArrival> trainArrivals, List<BusArrival> busArrivals) { if (!isFinishing()) { Intent intent = new Intent(this, MainActivity.class); Bundle bundle = new Bundle(); bundle.putParcelableArrayList("busArrivals", (ArrayList<BusArrival>) busArrivals); bundle.putSparseParcelableArray("trainArrivals", trainArrivals); intent.putExtras(bundle); finish(); startActivity(intent); overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); } }
From source file:com.perm.DoomPlay.AbstractReceiver.java
void showPlaybackDialog(ArrayList<Audio> audios) { AddTrackFromPlaybackDialog dialog = new AddTrackFromPlaybackDialog(); Bundle bundle = new Bundle(); bundle.putParcelableArrayList(AddTrackFromPlaybackDialog.keyBundleDialog, audios); dialog.setArguments(bundle);/*w ww . j av a 2 s . c o m*/ dialog.show(getSupportFragmentManager(), "tag"); }
From source file:com.example.julia.popularmovies.MovieGridFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mMovies != null) { // Save state of activity as parcelable outState.putParcelableArrayList(Config.MOVIES_KEY, mMovies); }/*from ww w .j av a 2 s .c o m*/ }
From source file:com.pericstudio.drawit.fragments.TestFragmentOne.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); //save the movie list to a parcelable prior to rotation or configuration change outState.putParcelableArrayList(STATE_DRAWINGS_WIP, drawingsWIP); }