Jason
Jason

Reputation: 452

Pull-down-pull-up Expandable ListView

I'm currently building an android app, with expandable list view. I'm using the library from https://github.com/chrisbanes/Android-PullToRefresh

The problem is there's no method for child click listener on PullToRefreshExpandableListView class. The class also can not set adapter extended from BaseExpandableListAdapter class

Can anyone help? or is there any library which support pull-up-down Expandable Listview beside this library? Thank you

Upvotes: 0

Views: 940

Answers (1)

Cheerag
Cheerag

Reputation: 435

use below code this will give you child click of PullToRefreshExpandableListView.

PullToRefreshExpandableListView PULL_EXLIST_VIEW;
    PULL_EXLIST_VIEW = (PullToRefreshExpandableListView) findViewById(R.id.listView1);

    ExpandableListView EXLIST_VIEW = PULL_EXLIST_VIEW.getRefreshableView();     
    EXLIST_VIEW.setOnChildClickListener(new OnChildClickListener() {

        @Override
        public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
            System.out.println("Child clicked");
            return false;
        }
    });

Upvotes: 1

Related Questions