Wie man die Standard-Textfarbe für android-TextView?

Ich kann nicht das Standard-Grau Textfarbe für TextView (und vielleicht auch andere Ansichten) in Android-23.

Habe ich versucht, es mit diesem code :

TextView textview= (TextView) mActivity.findViewById(R.id.my_textview);

int colorFirstTry = title.getCurrentTextColor(); //black
int colorSecondTry = title.getTextColors().getDefaultColor(); //black
int colorthirdTry = ContextCompat.getColor(mActivity, android.R.color.primary_text_light); //black

Mein Thema ist das Standard-Thema verwendet, in ein leeres Projekt Aktivität (AppTheme vom Thema.AppCompat.Licht.DarkActionBar Eltern). Farben sind blau, dunkelblau und Violett für jeweils colorPrimary, colorPrimaryDark und colorAccent.

Wenn ich navigieren Sie durch alle Themen.AppCompat.Licht.DarkActionBar Eltern, finde ich einen ähnlichen Grauwert :

<style name="Base.V7.Theme.AppCompat.Light" parent="Platform.AppCompat.Light">   
    ...
    <item name="colorPrimaryDark">@color/primary_dark_material_light</item>

Aber dieser Wert sein soll, overrided durch meine app-Thema Wert.

InformationsquelleAutor Burrich | 2016-01-09

Schreibe einen Kommentar