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

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

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

GridView.smoothScrollToPosition介绍

暂无

代码示例

代码示例来源:origin: wangdan/AisenWeiBo

@Override
public void onPictureDireSelected(PictureDireListFragment.PictureFileDire dire) {
  selectedDirName = dire.getName();
  txtCurrent.setText(selectedDirName);
  setItems(dire.getFiles());
  getRefreshView().smoothScrollToPosition(0);
  switchDireListFragment(layFileDires);
}

代码示例来源:origin: TommyLemon/APIJSON

gvGridPickerView.smoothScrollToPosition(itemPosition);

代码示例来源:origin: TommyLemon/Android-ZBLibrary

gvGridPickerView.smoothScrollToPosition(itemPosition);

代码示例来源:origin: braintree/android-card-form

@Override
public void onShow(DialogInterface dialog) {
  if (mSelectedYear > 0) {
    mYearGridView.smoothScrollToPosition(mSelectedYear);
  }
  mHasSelectedMonth = false;
  mHasSelectedYear = false;
}

代码示例来源:origin: stackoverflow.com

GridView other;
@Override public void onScroll(AbsListView view, int firstItem, int visItems, int total) {
  other.smoothScrollToPosition(firstItem);
}

代码示例来源:origin: stackoverflow.com

GridView other;
@Override public void onScroll(AbsListView view, int firstItem, int visItems, int total) {
  other.smoothScrollToPosition(firstItem);
}

代码示例来源:origin: hussien89aa/SellingApp

protected void onPostExecute(String  result2){
  int index=fullsongpath.size() - 1;
  if(index<0)
    index=0;
  fullsongpath.remove(index);
  fullsongpath.add(index, new AddToolItem("NewImage", R.drawable.loadimage, null));
  fullsongpath.add(index, new AddToolItem("path", R.drawable.hu,  bitmap ));
  myadapter.notifyDataSetChanged();
  ls.smoothScrollToPosition(fullsongpath.size() - 1);
  AddImagesPlease=AddImagesPlease+1;
}

代码示例来源:origin: stackoverflow.com

private int _savedGridPosition = 0;
private GridView _gridView;

...

@Override
protected void onSaveInstanceState (Bundle outState) {
  super.onSaveInstanceState(outState);
  outState.putInt("grid_position", _gridView.getFirstVisiblePosition());
}

@Override
protected void onRestoreInstanceState (Bundle savedInstanceState) {
  super.onRestoreInstanceState(savedInstanceState);
  if(savedInstanceState != null && savedInstanceState.containsKey("grid_position")) {
    _savedGridPosition = savedInstanceState.getInt("grid_position");
  }
}

@Override
protected void onResume() {
  _gridView.smoothScrollToPosition(_savedGridPosition);
}

@Override void onPause() {
  // set in onPause() too since onRestoreInstanceState() is only
  // called when the Activity is destroyed and recreated.
  _savedGridPosition = _gridView.getFirstVisiblePosition();
}

代码示例来源:origin: gigabytedevelopers/FireFiles

} else if (mLastSortOrder != state.derivedSortOrder) {
  mListView.smoothScrollToPosition(0);
  mGridView.smoothScrollToPosition(0);

相关文章

GridView类方法