Example usage for android.os Bundle putParcelableArrayList

List of usage examples for android.os Bundle putParcelableArrayList

Introduction

In this page you can find the example usage for android.os Bundle putParcelableArrayList.

Prototype

public void putParcelableArrayList(@Nullable String key, @Nullable ArrayList<? extends Parcelable> value) 

Source Link

Document

Inserts a List of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key.

Usage

From source file:org.bienvenidoainternet.app.MainActivity.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putInt("currentThemeId", currentThemeId);
    outState.putInt("themeId", themeId);
    outState.putParcelableArrayList("boardList", boardList);
    if (getSupportFragmentManager().getFragments() != null) {
        if (getSupportFragmentManager().getFragments().size() != 0) {
            try {
                getSupportFragmentManager().putFragment(outState, "mainFragment", mainFragment);
                getSupportFragmentManager().putFragment(outState, "childFragment", childFragment);
            } catch (Exception e) {
                e.printStackTrace();/*from www  .ja  v a2 s  .  c o m*/
            }
        }
    }
}

From source file:eu.pellerito.popularmoviesproject2.fragment.DetailFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {

    outState.putParcelable(String.valueOf(R.string.movie_save_state), mMovieContent);
    outState.putParcelableArrayList(String.valueOf(R.string.review_save_state), reviewArrayList);
    outState.putParcelableArrayList(String.valueOf(R.string.trailer_save_state), trailerArrayList);

    super.onSaveInstanceState(outState);

}

From source file:by.zatta.pilight.MainActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    outState.putParcelableArrayList("config", (ArrayList<? extends Parcelable>) mDevices);
    outState.putString("currentTitle", mCurrentTitle);
    super.onSaveInstanceState(outState);
}

From source file:com.krayzk9s.imgurholo.ui.MessagingFragment.java

@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
    ArrayList<JSONParcelable> messagesData = new ArrayList<JSONParcelable>();
    for (int i = 0; i < messageAdapter.getCount(); i++) {
        messagesData.add(messageAdapter.getItem(i));
    }/*from   www .j  av a 2s  .  c om*/
    savedInstanceState.putParcelableArrayList("content", messagesData);
    // Always call the superclass so it can save the view hierarchy state
    super.onSaveInstanceState(savedInstanceState);
}

From source file:io.demiseq.jetreader.activities.MainActivity.java

@Override
public void onSaveInstanceState(Bundle bundle) {
    bundle.putString("title", getSupportActionBar().getTitle().toString());
    bundle.putInt("menu", savedMenuId);
    bundle.putParcelableArrayList("list", mangas);
    int category_position = -1;
    bundle.putInt("category", category_position);
    super.onSaveInstanceState(bundle);
}

From source file:com.amaze.filemanager.fragments.ZipExplorerFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    if (openmode == ZIP_FILE) {
        outState.putParcelableArrayList(KEY_ELEMENTS, elements);
    }//from  ww w .j av  a2  s.  co m

    outState.putInt(KEY_OPEN_MODE, openmode);
    outState.putString(KEY_PATH, relativeDirectory);
    outState.putString(KEY_URI, realZipFile.getPath());
    outState.putString(KEY_FILE, realZipFile.getPath());
    outState.putParcelableArrayList(KEY_CACHE_FILES, files);
    outState.putBoolean(KEY_OPEN, isOpen);
}

From source file:com.amaze.filemanager.fragments.ZipViewer.java

void putDatatoSavedInstance(Bundle outState) {
    if (openmode == 0) {

        outState.putParcelableArrayList("wholelist", wholelist);
        outState.putParcelableArrayList("elements", elements);
    }/* w w  w . j av  a  2s .c  o  m*/
    outState.putInt("openmode", openmode);
    outState.putString("path", current);
    outState.putString("uri", s);
    outState.putString("file", f.getPath());

}

From source file:org.videolan.vlc.gui.browser.BaseBrowserFragment.java

public void onSaveInstanceState(Bundle outState) {
    outState.putString(KEY_MRL, mMrl);//from   w  w w. jav  a  2 s . c o  m
    outState.putParcelable(KEY_MEDIA, mCurrentMedia);
    outState.putParcelableArrayList(KEY_MEDIA_LIST, mediaList);
    if (mRecyclerView != null) {
        outState.putInt(KEY_POSITION, mLayoutManager.findFirstCompletelyVisibleItemPosition());
    }
    super.onSaveInstanceState(outState);
}

From source file:com.amaze.carbonfilemanager.fragments.ZipViewer.java

void putDatatoSavedInstance(Bundle outState) {
    if (openmode == 0) {

        outState.putParcelableArrayList(KEY_WHOLE_LIST, wholelist);
        outState.putParcelableArrayList(KEY_ELEMENTS, elements);
    }/*  w  w  w. ja va  2 s  . c  om*/
    outState.putInt(KEY_OPEN_MODE, openmode);
    outState.putString(KEY_PATH, current);
    outState.putString(KEY_URI, s);
    outState.putString(KEY_FILE, f.getPath());
    outState.putParcelableArrayList(KEY_CACHE_FILES, files);
    outState.putBoolean(KEY_OPEN, isOpen);
}

From source file:org.amahi.anywhere.fragment.ServerFilesFragment.java

private void tearDownFilesState(Bundle state) {
    if (areFilesLoaded()) {
        state.putParcelableArrayList(State.FILES, new ArrayList<Parcelable>(getFiles()));
    }//from w  w w. j  a v  a 2 s .c  om

    state.putSerializable(State.FILES_SORT, filesSort);
}