Code example for Fragment

Methods: isHiddenonSaveInstanceState

    public void onSaveInstanceState(Bundle bundle) {
        // Saves the show-hide status of the display 
        bundle.putBoolean(STATE_IS_HIDDEN, isHidden());
        // Always call the super method last 
    // Sets the state of the loaded flag 
    public void setLoaded(boolean loadState) {
        mIsLoaded = loadState;
     * Defines a custom View adapter that extends CursorAdapter. The main reason to do this is to 
     * display images based on the backing Cursor, rather than just displaying the URLs that the 
     * Cursor contains.