Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android preferences summary default color?

I have installed my app in a real phone, and even though in the emulator all the texts of the preferences summaries seem to be in the same color, in the real phone the color is different (some kind of blue... but I guess it depends on the phone's model).

How can I set this color to my custom preference component? (I have implemented my own seek bar, and its summary text color is different from all the other components text color...).

Thanks!

like image 209
Roee Avatar asked Nov 02 '10 20:11

Roee


2 Answers

Preference pUpdate = findPreference("sys_setting_update");
pUpdate.setSummary(Html.fromHtml("<font color=\"#B0C4DE\">This is content</font>"));

use Html.fromHtml("<font color=\"#B0C4DE\">This is content</font>") to setSummary

like image 115
chadeltu Avatar answered Sep 27 '22 19:09

chadeltu


I found these: android:textAppearance="?android:attr/textAppearanceLarge" and android:textAppearance="?android:attr/textAppearanceSmall" seem to do the trick.

like image 40
Jason Avatar answered Sep 27 '22 19:09

Jason