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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations