android.widget.GridView.onRestoreInstanceState()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(297)

本文整理了Java中android.widget.GridView.onRestoreInstanceState()方法的一些代码示例,展示了GridView.onRestoreInstanceState()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GridView.onRestoreInstanceState()方法的具体详情如下:
包路径:android.widget.GridView
类名称:GridView
方法名:onRestoreInstanceState

GridView.onRestoreInstanceState介绍

暂无

代码示例

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

@Override
public void onRestoreInstanceState(Parcelable state) {
  SavedState ss = (SavedState) state;
  mPrevFirstVisiblePosition = ss.prevFirstVisiblePosition;
  mPrevFirstVisibleChildHeight = ss.prevFirstVisibleChildHeight;
  mPrevScrolledChildrenHeight = ss.prevScrolledChildrenHeight;
  mPrevScrollY = ss.prevScrollY;
  mScrollY = ss.scrollY;
  mChildrenHeights = ss.childrenHeights;
  super.onRestoreInstanceState(ss.getSuperState());
}

代码示例来源:origin: TonicArtos/StickyGridHeaders

@Override
public void onRestoreInstanceState(Parcelable state) {
  SavedState ss = (SavedState)state;
  super.onRestoreInstanceState(ss.getSuperState());
  mAreHeadersSticky = ss.areHeadersSticky;
  requestLayout();
}

代码示例来源:origin: rockerhieu/emojicon

@Override
public void onRestoreInstanceState(Parcelable state) {
  if (!(state instanceof SavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  SavedState ss = (SavedState) state;
  super.onRestoreInstanceState(ss.getSuperState());
  mType = ss.type;
  mData = ss.data;
  mUseSystemDefaults = ss.useSystemDefaults;
  setScrollX(ss.scrollX);
  setScrollY(ss.scrollY);
  setEmojiData(mType, mData, mUseSystemDefaults);
}

代码示例来源:origin: UweTrottmann/SeriesGuide

@Override
public void onRestoreInstanceState(Parcelable state) {
  SavedState ss = (SavedState)state;
  super.onRestoreInstanceState(ss.getSuperState());
  mAreHeadersSticky = ss.areHeadersSticky;
  requestLayout();
}

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
public void onRestoreInstanceState(Parcelable state) {
  if (!(state instanceof SavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  final SavedState savedState = (SavedState) state;
  super.onRestoreInstanceState(savedState.getSuperState());
  final Adapter adapter = getAdapter();
  if (adapter != null && savedState.adapterState != null) {
    this.restoreAdapterState(adapter, savedState.adapterState);
  }
}

代码示例来源:origin: com.albedinsky.android/ui-widget-collection

/**
 */
@Override
public void onRestoreInstanceState(Parcelable state) {
  if (!(state instanceof SavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  final SavedState savedState = (SavedState) state;
  super.onRestoreInstanceState(savedState.getSuperState());
  final Adapter adapter = getAdapter();
  if (adapter != null && savedState.adapterState != null) {
    this.restoreAdapterState(adapter, savedState.adapterState);
  }
}

代码示例来源:origin: canqihe/TmallSale

@Override
public void onRestoreInstanceState(Parcelable state) {
  SavedState ss = (SavedState) state;
  super.onRestoreInstanceState(ss.getSuperState());
  mAreHeadersSticky = ss.areHeadersSticky;
  requestLayout();
}

代码示例来源:origin: OceanLabs/Android-Print-SDK

/*****************************************************
 *
 * Called when the fragment is top-most.
 *
 *****************************************************/
@Override
public void onTop()
 {
 super.onTop();
 // Create and set the adaptor
 mImageSpecAdaptor = new ImageSpecAdaptor( mKiteActivity, mImageSpecArrayList, mProduct, this );
 mGridView.setAdapter( mImageSpecAdaptor );
 // restore gridview state
 if ( mGridViewState != null )
  {
  mGridView.onRestoreInstanceState( mGridViewState );
  mGridViewState = null;
  }
 setTitle(); // restore title
 }

相关文章

GridView类方法