Reputation: 10708
I want to set a particular text color for the whole application. I have defined my style, but dont know whats going wrong..
I have defined my own style:
<style name="ActionBarTheme" parent="android:Theme">
<item name="android:textAppearance">@style/TextAppearance</item>
</style>
For TextAppearance
<style name="TextAppearance" parent="@android:style/TextAppearance">
<item name="android:textColor">@color/TextColor</item>
</style>
and in manifest set ActionBarTheme
Any help..
Upvotes: 1
Views: 1289
Reputation: 1059
Create this item under a style that you are applying to your application in the styles.xml file.
<item name="colorError">@color/orange</item>
Upvotes: 0
Reputation: 5954
I think you cannot use text appearance here. You can however add this to your theme
<item name="android:editTextColor">#65e4f4</item>
<item name="android:textColorPrimary">#65e4f4</item>
<item name="android:textColorSecondary">#65e4f4</item>
<item name="android:textColorTertiary">#65e4f4</item>
<item name="android:textColorPrimaryInverse">#65e4f4</item>
<item name="android:textColorSecondaryInverse">#65e4f4</item>
<item name="android:textColorTertiaryInverse">#65e4f4</item>
<item name="android:textSize">25sp</item>
Upvotes: 0
Reputation: 90
you can use TextView.getTextColors().getDefaultColor() for set default text color. Actually I never used this but I think it may be help you.
For style
<style name="TextColor">
<item name="android:textColor">#00FF00</item>
</style>
Then in layout file
<TextView style="@style/TextColor" />
Thanks
Upvotes: 1