2015-08-17 1 views
1

Dans mon projet j'essaie d'accéder à l'adaptateur (BaseExpandableListAdapter) défini sur ExpandableListView en appelant la méthode getAdapter(). Mais getAdapter() renvoie android.widget.ExpandableListConnector.ExpandableListView.getAdapter() en renvoyant android.widget.ExpandableListConnector

ici est mon code

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

Et je reçois dans logcat comme ce

enter image description here

Répondre

5

Vous devez utiliser:

mExpandableListView.getExpandableListAdapter();