已启用 Listview 选择器中的第一项

问题描述

当我使用自定义适配器向列表视图添加项目时,第一个元素选择器始终处于激活状态。 有一些方法可以禁用此操作。

<ListView
            android:id="@+id/listViewMaterials"
            android:layout_width="match_parent"
            android:layout_height="270dp"
            android:choiceMode="singleChoice"
            android:listSelector="@color/buttonblue"/>

Java:

CustomAdapter adapter = new CustomAdapter(this,GetData(modelResult));
            ListViewMaterials.setAdapter(adapter);

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)