View convertView = elv.getChildAt(i); Long targetPacked = (Long) convertView.getTag(AQuery.TAG_NUM);
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; } });
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); }
view =(View) parent.getChildAt(viewPosition); Object ob=view.getTag(R.id.tag_select); if(ob.equals(lastObject)){
@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(); } }
View child; for (int i = 0; i < childCount; i++) { child = elMain.getChildAt(i); child.getHitRect(rect);
@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; }
View convertView = elv.getChildAt(i); Long targetPacked = (Long) convertView.getTag(AQuery.TAG_NUM);