I want to change the look of my Android app's preference screen to dark text color. How can I do this? (I´ve already changed the background to white color)
I assume you use an Activity which extends the PreferenceActivity
. You can use the setTheme
method to set a custom theme on your preference screen.
Just define one in res/values/themes.xml
.
It would look like this:
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.DarkText">
<item name="android:textColor">#000000</item>
</style>
</resources>
Afterwards set it in your Activity:
setTheme(R.style.Theme_DarkText);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With