Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExpandableListView.getAdapter() returning android.widget.ExpandableListConnector

In my project I am trying to access the adapter(BaseExpandableListAdapter) set to a ExpandableListView by calling getAdapter() method. But getAdapter() returns android.widget.ExpandableListConnector.

here is my code

mExpandableListView.setAdapter(new ItemsExpListAdapter(navigationDrawerItems, getActivity()));
Log.e("adapter" , mExpandableListView.getAdapter().getClass().toString());

And I am getting in logcat like this

enter image description here

like image 304
J.R Avatar asked Dec 15 '22 12:12

J.R


1 Answers

You should use:

mExpandableListView.getExpandableListAdapter();
like image 161
hasan Avatar answered Dec 21 '22 11:12

hasan