Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ExpandableListView.getAdapter()返回android.widget.ExpandableListConnector_Android_Expandablelistview_Expandablelistadapter - Fatal编程技术网

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();