I'm having trouble with applying a custom scheme(style) to certain views. I have defined my own style in res/values/styles.xml
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="myStyle1">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/red</item>
<item name="android:textColorHighlight">@color/blue</item>
<item name="android:textColorHint"> @color/fuchsia</item>
<item name="android:textColorLink">@color/olive</item>
<item name="android:typeface">serif</item>
</style>
<style name="AppTheme" parent="android:Theme.Light" />
</resources>
I have applied this style to the main activity of my simple test application, like this
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/myStyle1" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
.
.
.
</application>
The layout of the MainActivity contains a couple of buttons, some textViews, some of them have the style attribute spiecified explicitly, others should be inhertiting it from the whole activity.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/layout_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/silver"
android:orientation="vertical" >
<EditText android:id="@+id/edit_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:hint="@string/edit_message" />
<Button android:id="@+id/send_button"
style="@style/myStyle1"
android:text="@string/button_send" />
<Button android:id="@+id/relative_activity"
android:text="@string/rel_activitity_text"
android:onClick="startRelativeActivity"/>
<Button android:id="@+id/button_TTT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:textColor="@color/red"
android:text="@string/button_TTT" />
<fragment android:name="my.firstapp.Fragment1"
android:background="@color/red"
android:id="@+id/list"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
As far as I can tell, everything in the activity should be stylized according to the style I ahve defined, however, this is what I get
As you can see, only the buttons with the specified style have their text in red, the other two don't. However, even the white buttons get the correct font from the scheme, so at least some of it is being applied. Why not all of it? Any help would be appreciated, I'm thoroughly confused.