zoukankan      html  css  js  c++  java
  • Android ExpandableListView长按事件

    expandableListView.setOnItemLongClickListener(new OnItemLongClickListener(){
    
            @Override
            public boolean onItemLongClick(AdapterView<?> arg0, View arg1,
                    int arg2, long arg3) {
                // TODO Auto-generated method stub
                if(ExpandableListView.getPackedPositionType(arg3)==ExpandableListView.PACKED_POSITION_TYPE_CHILD){
                    long packPos = ((ExpandableListView) arg0).getExpandableListPosition(arg2);
                    int groupPosition=ExpandableListView.getPackedPositionGroup(packPos);
                    int childPosition= ExpandableListView.getPackedPositionChild(packPos);
                    System.out.println("------------------------------->"+groupPosition);
                    System.out.println("--------------------------------------->"+childPosition);
                    return true;
                }return false;
            }
            });
  • 相关阅读:
    ERROR: epmd error for host "yourhostname": timeout
    leetcode485
    leetcode463
    leetcode496
    leetcode344
    leetcode412
    leetcode500
    leetcode476
    leetcode557
    leetcode461
  • 原文地址:https://www.cnblogs.com/suizi/p/3666539.html
Copyright © 2011-2022 走看看