本文整理了Java中android.widget.GridView.onSaveInstanceState()
方法的一些代码示例,展示了GridView.onSaveInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GridView.onSaveInstanceState()
方法的具体详情如下:
包路径:android.widget.GridView
类名称:GridView
方法名:onSaveInstanceState
暂无
代码示例来源:origin: ksoichiro/Android-ObservableScrollView
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.prevFirstVisiblePosition = mPrevFirstVisiblePosition;
ss.prevFirstVisibleChildHeight = mPrevFirstVisibleChildHeight;
ss.prevScrolledChildrenHeight = mPrevScrolledChildrenHeight;
ss.prevScrollY = mPrevScrollY;
ss.scrollY = mScrollY;
ss.childrenHeights = mChildrenHeights;
return ss;
}
代码示例来源:origin: TonicArtos/StickyGridHeaders
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.areHeadersSticky = mAreHeadersSticky;
return ss;
}
代码示例来源:origin: rockerhieu/emojicon
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.data = mData;
ss.type = mType;
ss.useSystemDefaults = mUseSystemDefaults;
ss.scrollX = getScrollX();
ss.scrollY = getScrollY();
return ss;
}
代码示例来源:origin: UweTrottmann/SeriesGuide
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.areHeadersSticky = mAreHeadersSticky;
return ss;
}
代码示例来源:origin: canqihe/TmallSale
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.areHeadersSticky = mAreHeadersSticky;
return ss;
}
代码示例来源:origin: OceanLabs/Android-Print-SDK
/*****************************************************
*
* Called when the fragment is not on top.
*
*****************************************************/
@Override
public void onNotTop()
{
super.onNotTop();
// Clear out the stored images to reduce memory usage
// when not on this screen. Save state so we can return
// to correct scroll offset in onTop
if ( mGridView != null )
{
mGridViewState = mGridView.onSaveInstanceState();
mGridView.setAdapter( null );
}
mImageSpecAdaptor = null;
}
代码示例来源:origin: com.albedinsky.android/ui-widget-collection
/**
*/
@Override
public Parcelable onSaveInstanceState() {
final Adapter adapter = getAdapter();
if (adapter != null) {
final Parcelable adapterState = saveAdapterState(adapter);
if (adapterState != null) {
final SavedState savedState = new SavedState(super.onSaveInstanceState());
savedState.adapterState = adapterState;
return savedState;
}
}
return super.onSaveInstanceState();
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
public Parcelable onSaveInstanceState() {
final Adapter adapter = getAdapter();
if (adapter != null) {
final Parcelable adapterState = saveAdapterState(adapter);
if (adapterState != null) {
final SavedState savedState = new SavedState(super.onSaveInstanceState());
savedState.adapterState = adapterState;
return savedState;
}
}
return super.onSaveInstanceState();
}
内容来源于网络,如有侵权,请联系作者删除!