Search code examples
androidtextcolorsheaderpreference

Changing the text color of preference header


my overall theme is using the Theme.AppCompat.Light. When an item on the left side is selected, the text color turns WHITE, which is hard to see against the light background. I want to prevent this color change and keep it as black. Anyone know how to do this?

I tried changing listSelector styling, but that only changes the background color. I need to change the foreground text color. Thanks.

enter image description here


Solution

  • <item name="android:activatedBackgroundIndicator">@drawable/activated_background_settings</item>

    That should solve the problem. The drawable that it is referencing is a selector in this case