Expand Expandable Listview in android on button Click

Posted by user3146145 on Stack Overflow See other posts from Stack Overflow or by user3146145
Published on 2014-05-28T03:03:58Z Indexed on 2014/05/28 3:25 UTC
Read the original article Hit count: 169

Filed under:
|

I am implementing expandable list view with its custom adapter. The group element needs to have 2 buttons, first as a parent group element and a button below it.

My problem is, I want to expand the list view on click of the button below instead of the group element. Also, The group element onClick needs to call another activity.

I can disable the expanding of the expandablelistview by

`mainExpListView.setOnGroupClickListener(new OnGroupClickListener() {

        @Override
        public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) 
        {   

            return false;
        }`

So my questions:

  1. Is there any way to disable the group element and get it to perform other functions (Like navigate to another activity?)

  2. How to set an onclick method on them bottom image to expand?

Thank you.

© Stack Overflow or respective owner

Related posts about android

Related posts about expandablelistview