Maxrunner
Maxrunner

Reputation: 1965

use PullToRefreshExpandableListView with custom fragment

So i've just tried using the PulltoRefreshExpandableListView inside a custom fragment that extends Fragment, but when i try to set the adapter, here's the error:

mPullRefreshExpandableListView.setAdapter(adapter);

setAdapter(android.widget.ListAdapter) in PullToRefreshAdapterViewBase cannot be applied to (sinfic.mobile.ipdms.adapters.GenericMultiColumnIconLineExpandableAdapter)

The GenericMultiColumn.... adapter extends BaseExpandableAdapter. What's the best solution for this?

Upvotes: 0

Views: 802

Answers (1)

Lena Bru
Lena Bru

Reputation: 13937

Try this

ExpandableListView actualListview = mPullRefreshExpandableListView.getRefreshableView();

actualListView.setAdapter(adapter);

Upvotes: 4

Related Questions