my problem is an Android app, that uses android:Theme as a default style and android:Theme.Holo.Light for OSes of version 11 and newer and android:Theme.Holo.Light.DarkActionBar for v14 and newer.
The app project was created using the ADT Eclipse-wizzard, so the AndroidManifest.xml sets android:theme="@style/AppTheme", and there are three styles.xml files, one in the values, values-v11, and values-v14 folders respectively. The default styles.xml sets
<style name="AppBaseTheme" parent="android:Theme">
the styles.xml in values-v11 sets
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
and finally styles.xml in values-v14 sets
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
This worked nicely for quite some time. I’ve checked the appearance for gingerbread using an emulator and the Holo-theme on a Galaxy SIII.
But now, also the Samsung phone will only use the classic android:Theme, no matter what I set in the style.xmls. I’ve also tried to raise the minSdkVersion in AndroidManifest.xml to 16 and to set the Holo-theme in the default styles.xml. Cleaning up and rebuilding had no effect either.
The Holo-theme is happily ignored by the app, and I don’t know where else I can try looking to fix things.
Any help or pointers are very much appreciated.
Update
If I replace
android:theme="@style/AppTheme"
in AndroidManifest.xml with
android:theme="@style/AppBaseTheme"
everything works fine (AppBaseTheme is the platform-dependent parent theme for the customized platform-independent AppTheme). It somehow looks as if the Android runtime is lazy and does not care to look for the the most specific version of AppBaseTheme, but always takes the one found in values/styles.xml
Finally, after several unsuccessful cleans I took a different approach and tried to rename
AppThemetoMyTheme(and updating the reference inAndroidManafest.xmlaccordingly). Now the app references the correct AppBaseTheme for each version of Android.