Search in sources :

Example 16 with Parcelable

use of android.os.Parcelable in project UltimateAndroid by cymcsg.

the class BaseLayoutManager method onSaveInstanceState.

@Override
public Parcelable onSaveInstanceState() {
    final Parcelable superState = super.onSaveInstanceState();
    final LanedSavedState state = new LanedSavedState(superState);
    final int laneCount = (mLanes != null ? mLanes.getCount() : 0);
    state.lanes = new Rect[laneCount];
    for (int i = 0; i < laneCount; i++) {
        final Rect laneRect = new Rect();
        mLanes.getLane(i, laneRect);
        state.lanes[i] = laneRect;
    }
    state.orientation = getOrientation();
    state.laneSize = (mLanes != null ? mLanes.getLaneSize() : 0);
    state.itemEntries = mItemEntries;
    return state;
}
Also used : Rect(android.graphics.Rect) Parcelable(android.os.Parcelable)

Example 17 with Parcelable

use of android.os.Parcelable in project DragTopLayout by chenupt.

the class DragTopLayout method onSaveInstanceState.

@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    SavedState state = new SavedState(superState);
    state.panelState = panelState.toInt();
    return state;
}
Also used : Parcelable(android.os.Parcelable)

Example 18 with Parcelable

use of android.os.Parcelable in project UltimateAndroid by cymcsg.

the class SlidingLayout method onSaveInstanceState.

@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    SavedState ss = new SavedState(superState);
    ss.isOpen = isSlideable() ? isOpen() : mPreservedOpenState;
    return ss;
}
Also used : Parcelable(android.os.Parcelable)

Example 19 with Parcelable

use of android.os.Parcelable in project UltimateAndroid by cymcsg.

the class Patio method onSaveInstanceState.

/**
     * Lifecycle methods
     * https://speakerdeck.com/cyrilmottier/deep-dive-into-android-state-restoration
     * https://github.com/CharlesHarley/Example-Android-SavingInstanceState/blob/master/src/com/example/android/savinginstancestate/views/LockCombinationPicker.java
     * https://gist.github.com/granoeste/4037468
     */
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    SavedState savedState = new SavedState(superState);
    savedState.setThumbnailsPaths(getThumbnailsPaths());
    savedState.setTakePicturePath(mTakePicturePath);
    return savedState;
}
Also used : Parcelable(android.os.Parcelable)

Example 20 with Parcelable

use of android.os.Parcelable in project UltimateAndroid by cymcsg.

the class DownloadProgressBar method onSaveInstanceState.

@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    SavedState savedState = new SavedState(superState);
    savedState.mState = mState;
    savedState.mmCurrentPlayTime = getCurrentPlayTimeByState(mState);
    return savedState;
}
Also used : Parcelable(android.os.Parcelable)

Aggregations

Parcelable (android.os.Parcelable)818 Bundle (android.os.Bundle)99 View (android.view.View)85 Intent (android.content.Intent)56 SparseArray (android.util.SparseArray)38 Test (org.junit.Test)31 ArrayList (java.util.ArrayList)26 MenuItem (android.view.MenuItem)23 ImageView (android.widget.ImageView)23 TextView (android.widget.TextView)17 MenuItem (com.actionbarsherlock.view.MenuItem)14 SuppressLint (android.annotation.SuppressLint)13 Dialog (android.app.Dialog)13 MediumTest (android.support.test.filters.MediumTest)13 NameNotFoundException (android.content.pm.PackageManager.NameNotFoundException)12 Paint (android.graphics.Paint)12 MenuView (com.android.internal.view.menu.MenuView)12 RemoteException (android.os.RemoteException)11 Bitmap (android.graphics.Bitmap)10 ShortcutIconResource (android.content.Intent.ShortcutIconResource)9