I guess the answer to my question is that there is no way to do what I wanted. I ended up using two themes for both colors, even though changing the theme will apply after restarting the activity.
Changing preference text color after the layout is constructed?
Question
I want to programmatically change the text color of all ListPreference in my PreferenceActivity, after the layout is constructed (so after onCreate
). Basically I want to be able to toggle all text between black and white.
I've tried having two themes for both colors, but that requires to restart the activity to toggle between themes. I don't want that.
Can someone come up with a solution to this problem?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow