i have made 2 styles.xml:s, 1 in values , 1 in values-v11.
/res/values/styles.xml
<resources> <style name="apptheme" parent="@android:style/theme.light"> </style> </resources>
/res/values-v11/styles.xml
<resources> <style name="apptheme" parent="@android:style/theme.holo.light"> <item name="android:actionbarstyle">@style/myactionbar</item> </style> <style name="myactionbar" parent="android:theme.holo.light.darkactionbar"> <item name="android:background">#3b5998</item> </style> </resources>
androidmanifesr.xml
<uses-sdk android:minsdkversion="7" android:targetsdkversion="16" /> <application android:allowbackup="true" android:icon="@drawable/pic" android:label="@string/app_name" android:theme="@style/apptheme" >
when run program on android 4.2 devices action bar disappears, guess 4.2 devices goes /res/values/styles.xml it's styles. doing wrong?
edit! found issue, in /res/values-v11/styles.xml parent="android:theme.holo.light.darkactionbar"
in "myactionbar" style should parent="@android:style/widget.holo.actionbar"
or parent="@android:style/widget.holo.light.actionbar"
you have set android:targetsdkversion
16, android 4.1 jellybean.
android 4.2 version 17, try changing uses-sdk this:
<uses-sdk android:minsdkversion="7" android:targetsdkversion="17" />
Comments
Post a Comment