Code example for ExpandableListView

Methods: collapseGroupsetSelectedGroup

0
 
    private View.OnClickListener mFlotageViewOnClickListener = new View.OnClickListener() {
        @Override 
        public void onClick(View v) { 
            final int groupPos = (Integer) v.getTag(); 
            mList.collapseGroup(groupPos); 
            mList.setSelectedGroup(groupPos); 
        } 
    }; 
 
    /** 
     * The subclass should overrider this method to display the flotage view 
     * content. 
     */ 
    public void onFlotageViewContentChanged(int groupPosition, int childPosition) {
        mFlotageView.setTag(groupPosition);
    } 
 
    @Override 
    public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
            int childPosition, long id) {