Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.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
Android 具有多个适配器和节索引器的ListView_Android_Listview_Android Listview_Sectionindexer - Fatal编程技术网

Android 具有多个适配器和节索引器的ListView

Android 具有多个适配器和节索引器的ListView,android,listview,android-listview,sectionindexer,Android,Listview,Android Listview,Sectionindexer,我有一个活动,它包含一个可由不同适配器填充的ListView。 每个可能填充列表的适配器都是一个特定类的实例,这些类中的每一个都实现了SectionIndexer接口。 我已经在我的listview中启用了FastScroll,在我第一次使用listview.setAdapter(适配器X)时,它工作正常。但是,当我使用ListView.setAdapter(适配器Y)时,它仍然使用以前适配器的SectionIndexer(适配器X)。 如何“重置”列表视图的节索引器

我有一个活动,它包含一个可由不同适配器填充的
ListView
。 每个可能填充列表的适配器都是一个特定类的实例,这些类中的每一个都实现了
SectionIndexer
接口。 我已经在我的listview中启用了
FastScroll
,在我第一次使用
listview.setAdapter(适配器X)
时,它工作正常。但是,当我使用
ListView.setAdapter(适配器Y)
时,它仍然使用以前适配器的
SectionIndexer
(适配器X)。
如何“重置”列表视图的节索引器