android - Inheriting from Theme.AppCompat* -


currently working on migrating actionbar in support libraries. trying migrate old themes inherit theme.appcompat.light.darkactionbar isn't going smoothly.

it fine if apply theme in manifest such:

<activity     android:name="com.fitsby.loginactivity"     android:screenorientation="portrait"     android:theme="@style/theme.appcompat.light.darkactionbar" > </activity> 

but runtime error, stating loginactivity(subclass of actionbaractivity) must have theme inherits theme.appcompat, when following: in styles.xml:

<style name="apptheme" parent="@style/theme.appcompat.light.darkactionbar">     <item name="android:typeface">sans</item>    </style>  

and in manifest:

<activity     android:name="com.fitsby.loginactivity"     android:screenorientation="portrait"     android:theme="@style/apptheme" > </activity> 

any ideas why happening? not see problem, since apptheme inherits 1 of appcompat themes.

if have different values folder in application, different api levels, make sure each of themes folders extend required theme.appcompat.* themes.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -