Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Action Bar is null when using Theme.Wallpaper [closed]

I need to have an action bar along with having a set theme as Theme.Wallpaper. I have put the theme as Wallpaper in styles.xml in values folder, but it makes my action bar not to get initialized. How to get the both things done? Viz- Theme as Wallpaper and with all glories of an Action Bar?

like image 951
Anvita Avatar asked Jan 07 '13 09:01

Anvita


1 Answers

Inside your styles.xml file, for getting the Action Bar working, use the theme with parent as android:Theme.Holo.Light.DarkActionBar

For getting the attributes of a Wallpaper Theme in android, use the items that are used by the android Wallpaper theme style, like, showWallpaper -> true ...

so customize your "AppTheme" with adding those values to the items.

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" >
   <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:colorBackgroundCacheHint">@null</item>
    <item name="android:windowShowWallpaper">true</item>
</style>

This will serve the purpose.

like image 105
CyBer2t Avatar answered Oct 13 '22 23:10

CyBer2t