Android theme not being set -
i have theme refuses applied activities - none of styles applied. if don't supply layout_width
/layout_height
attributes <button>
gets runtime error, showing button
class isn't being applied.
/res/values/themes.xml:
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="theme" parent="android:style/theme.black"> <item name="android:windownotitle">true</item> <item name="android:buttonstyle">@style/button</item> <item name="android:windowbackground">@color/page_background_light</item> <item name="android:textappearance">@style/textappearance</item> </style> </resources>
/res/values/styles.xml:
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="textappearance" parent="@android:style/textappearance"> <item name="android:textsize">12sp</item> <item name="android:textcolor">@color/darkblue</item> </style> <style name="button" parent="@android:style/widget.button"> <item name="android:layout_width">fill_parent</item> <item name="android:layout_height">wrap_content</item> <!--<item name="android:textcolor">#3c2f4f</item> <item name="android:textsize">20dip</item>--> </style> </resources>
and relevant manifest setting:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/theme">
what's obvious mistake i'm missing?
i've been struggling well, , think i've found may have been problem - perhaps same.
i had custom theme defined in res\values
folder, not in values-v11
, values-v14
folders. think made in devices (specially 2 testing with!), theme not applied because did not exist.
i see properties set in custom theme (applied @ application level) taking effect.
Comments
Post a Comment