I am trying to apply a button text color by default in styles.xml
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme">
<item name="android:windowFullscreen">true</item>
<item name="android:windowBackground">@color/black</item>
<item name="android:textColor">@color/green</item>
</style>
How do I make the style change button color, and apply throughout the entire application? My mainfest includes:
<application
android:icon="@drawable/ic_launcher"
android:label="Hack the World"
android:theme="@style/AppTheme">
This changes all text (such as a TextView), but does not change the text in a button. If I use the ColorThemes style from above and place it in the xml for the button like this:
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:onClick="loadSavedgame"
android:text="Load Saved Game"
android:textColor="@color/green" />"
Then it works perfectly. Why doesn't this apply universally because of the style? All different versions of styles.xml have the same code.