首先请看下图:
我已经通过@styles 改变了文本颜色的背景颜色
<style name="PreferenceTheme">
<item name="android:background">#000000</item>
<item name="android:textColor">#FFFFFF</item>
</style>
在我的应用程序中,我想更改焦点颜色(使用光电鼠标滚动时)。我怎么做?我想在首选项中更改该颜色(如图片所示)。
最佳答案
您可以在 xml 中使用 android:listSelector="@android:color/transparent"属性。
例如:
<ListView
android:id="@+id/mainListView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:listSelector="@color/white">
</ListView>
甚至
android:listSelector="@drawable/list_selector"
我想也行
关于java - 如何在首选项中更改 ListView 中的焦点颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14464566/