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

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

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

ExpandableListView.getChildAt介绍

暂无

代码示例

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

View convertView = elv.getChildAt(i);
Long targetPacked = (Long) convertView.getTag(AQuery.TAG_NUM);

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

elv.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
   @Override
   public boolean onChildClick(ExpandableListView parent, View v,
       int groupPosition, int childPosition, long id) {
     // we need to obtain the relative y coordinate of the child view, 
     // not its clicked subview, thus first we try to calculate its true index
     long packedPos = ExpandableListView.getPackedPositionForChild(groupPosition, childPosition);
     int viewPos = elv.getFlatListPosition(packedPos) - elv.getFirstVisiblePosition(); 
     View childView = parent.getChildAt(viewPos); // got it
     if (childView.getTop() < elv.getHeaderViewHeight()*.75){
        // if the clicked child item overlaps more than 25%
        //  of pinned header, consider it being underneath
        long groupPackedPos = ExpandableListView.getPackedPositionForGroup(groupPosition);
        int groupFlatPos = elv.getFlatListPosition(groupPackedPos);
        elv.smoothScrollToPosition(groupFlatPos);
     }
     return true;
   }
 });

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

public View getGroupView(ExpandableListView listView, int groupPosition) {
 long packedPosition = ExpandableListView.getPackedPositionForGroup(groupPosition);
 int flatPosition = listView.getFlatListPosition(groupPosition);
 int first = listView.getFirstVisbileView();
 return listView.getChildAt(flatPosition - first);
}

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

view =(View) parent.getChildAt(viewPosition);
Object ob=view.getTag(R.id.tag_select);
if(ob.equals(lastObject)){

代码示例来源: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: stackoverflow.com

View child;
for (int i = 0; i < childCount; i++) {
  child = elMain.getChildAt(i);
  child.getHitRect(rect);

代码示例来源: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

View convertView = elv.getChildAt(i);
Long targetPacked = (Long) convertView.getTag(AQuery.TAG_NUM);

相关文章

ExpandableListView类方法