ExpandableListView.getAdapter()返回android.widget.ExpandableListConnector
在我的项目中,我试图通过调用ExpandableListView.getAdapter()返回android.widget.ExpandableListConnector,android,expandablelistview,expandablelistadapter,Android,Expandablelistview,Expandablelistadapter,在我的项目中,我试图通过调用getAdapter()方法来访问设置为ExpandableListView的适配器(BaseExpandableListAdapter)。但是getAdapter()返回android.widget.ExpandableListConnector 这是我的密码 mExpandableListView.setAdapter(new ItemsExpListAdapter(navigationDrawerItems, getActivity())); Log.e("ad
getAdapter()
方法来访问设置为ExpandableListView的适配器(BaseExpandableListAdapter
)。但是getAdapter()
返回android.widget.ExpandableListConnector
这是我的密码
mExpandableListView.setAdapter(new ItemsExpListAdapter(navigationDrawerItems, getActivity()));
Log.e("adapter" , mExpandableListView.getAdapter().getClass().toString());
我就这样进入了logcat
您应该使用:
mExpandableListView.getExpandableListAdapter();