Currently working on migrating to ActionBar in the support libraries. Currently trying to migrate my old themes to inherit from Theme.AppCompat.Light.DarkActionBar
but it isn't going very smoothly.
It is fine if I apply the theme in the manifest as such:
<activity
android:name="com.fitsby.LoginActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar" >
</activity>
But I get a runtime error, stating that LoginActivity(subclass of ActionBarActivity) must have a theme which inherits from Theme.AppCompat, when I do the following: in styles.xml:
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:typeface">sans</item>
</style>
and in the manifest:
<activity
android:name="com.fitsby.LoginActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" >
</activity>
Any ideas why that is happening? I do not see a problem, since AppTheme clearly inherits from one of the AppCompat Themes.
If you have different values
folder in your application, for different API levels, make sure that each of those themes from the folders extend from the required Theme.AppCompat.*
themes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With