white background and black text color on android wear app -


in android wear app need change default black background white , text color black. in order not set colors each time create new layout file, created theme defines background , text color , applied main layoutfile

the layout file:

<?xml version="1.0" encoding="utf-8"?> <android.support.wearable.view.watchviewstub     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/watch_view_stub"     android:layout_width="match_parent"     android:layout_height="match_parent"     app:roundlayout="@layout/round_activity_wear"     app:rectlayout="@layout/rect_activity_wear"     tools:context="com.example.wear.wearactivity"     tools:deviceids="wear"     style="@style/apptheme"> </android.support.wearable.view.watchviewstub> 

the style file:

<?xml version="1.0" encoding="utf-8"?> <resources>     <style name="apptheme" parent="theme.appcompat.light">         <!-- customize theme here. -->         <item name="android:background">#ffffff</item>         <item name="android:text">#000000</item>         <item name="android:color">#000000</item>         <item name="android:colorforeground">#000000</item>         <item name="android:textcolor">#000000</item>         <item name="android:textcolorprimary">#000000</item>         <item name="android:textcolorsecondary">#000000</item>         <item name="android:textappearance">@style/weartextappearance</item>     </style>      <style name="weartextappearance" parent="@android:style/textappearance.medium">         <item name="android:color">#000000</item>         <item name="android:colorforeground">#000000</item>     </style> </resources> 

after attached it, background changed white, text color remained white. did wrong? why text color not black expect it?

it worked after set theme inside application tag of manifest.


Comments