android.widget.ExpandableListView.getFirstVisiblePosition()方法的使用及代码示例

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

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

ExpandableListView.getFirstVisiblePosition介绍

暂无

代码示例

代码示例来源:origin: androidquery/androidquery

int first = elv.getFirstVisiblePosition();
int last = elv.getLastVisiblePosition();

代码示例来源:origin: lucid-lynxz/BlogSamples

@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
  ChildHolder childHolder = null;
  if (convertView == null) {
    childHolder = new ChildHolder();
    convertView = this.layoutInflater.inflate(R.layout.item_fl_child, null);
    childHolder.photo = (ImageView) convertView.findViewById(R.id.iv_friend);
    childHolder.tvName = (TextView) convertView.findViewById(R.id.tv_name);
    convertView.setTag(childHolder);
  } else {
    childHolder = (ChildHolder) convertView.getTag();
  }
  FriendBean child = this.childList.get(groupPosition).get(childPosition);
  childHolder.tvName.setText(child.name);
  /*
  * 延时加载图片
  * 这里计算得到的firstVisiblePosition等位置是包含groupItem以及childItem在内的整个列表组合顺序
  * */
  if (this.expandGroupIndex >= 0 && !isScrolling) {
    if (!TextUtils.isEmpty(child.photoUrl)
        && childPosition >= this.el.getFirstVisiblePosition()
        && childPosition <= this.el.getLastVisiblePosition()) {
      //todo: imageLoader加载图片
    }
  }
  return convertView;
}

代码示例来源:origin: derry/delion

@Override
  public void captureThumbnail(Canvas canvas) {
    ViewUtils.captureBitmap(mView, canvas);
    mSnapshotContentChanged = false;
    mSnapshotListPosition = mListView.getFirstVisiblePosition();
    View topItem = mListView.getChildAt(0);
    mSnapshotListTop = topItem == null ? 0 : topItem.getTop();
    mSnapshotWidth = mView.getWidth();
    mSnapshotHeight = mView.getHeight();
  }
}

代码示例来源:origin: derry/delion

@Override
public boolean shouldCaptureThumbnail() {
  if (mView.getWidth() == 0 || mView.getHeight() == 0) return false;
  View topItem = mListView.getChildAt(0);
  return mSnapshotContentChanged
      || mSnapshotListPosition != mListView.getFirstVisiblePosition()
      || mSnapshotListTop != (topItem == null ? 0 : topItem.getTop())
      || mView.getWidth() != mSnapshotWidth
      || mView.getHeight() != mSnapshotHeight;
}

代码示例来源:origin: com.googlecode.android-query/android-query

int first = elv.getFirstVisiblePosition();
int last = elv.getLastVisiblePosition();

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

if(flatPosition<_expandableListView.getFirstVisiblePosition() || 
  flatPosition>_expandableListView.getLastVisiblePosition())
  _expandableListView.post(new Runnable() {

相关文章

ExpandableListView类方法