ActionBar Sherlock - Backgroundimage in Actionbar
I would love to set a Backgroundimage to the ActionBar which I imported with the "ActionBar Sherlock" library. However I can't find any link on the internet on how to distinctively set an BackgroundImage with XML. Does anybody here have a hint which he could give me :)?
You create a style for your actionbar, it has to inherit Theme.Sherlock or Theme.Sherlock.Light. Then link to your image in the attribute abBackground. Assuming you have an image called myBackgroundImage in res/drawable your style xml would be: <style name="Actionbar" parent="Theme.Sherlock"> <item name="abBackground">#drawable/myBackgroundImage</item> </style> You can find more attributes for the actionbar here: ActionBarSherlock - Theming More on styles is found here: Styles and Themes | Android Developers
In your style.xml file add a custom style like this: <style name="MyActionBarStyle" parent="Widget.Sherlock.ActionBar.TabBar"> <item name="android:background">#drawable/actionbar_tab_bg</item> </style> and add this style to your app theme with this to lines, the first for the Android <3.0 and the second for the >3.0 <style name="ReservasAppTheme" parent="#style/Theme.Sherlock.Light"> <item name="actionBarTabStyle">#style/MyActionBarStyle</item> <item name="android:actionBarTabStyle">#style/MyActionBarStyle</item> </style> You should add this style to the application tag in manifest
you might want to look at : http://actionbarsherlock.com/theming.html
How to define a gaussian filter for GPS noise removal
drag and zoom for multiple images in android
Hibernate - Could not execute JDBC batch update
Cannot retrieve email from Contacts
Native Browser Automation using Appium 188.8.131.52 on Windows 7 Android real device: Could not find a connected Android device
Speech recognition on Android trainable for specific grammar/accent?
Open activity when GCM notification was clicked
Activity not working
Android phone cannot recognize nfc tags [closed]
any way to discover nearby wireless devices not in same network - Android / IOS?
Android: Shortcut to testing by saving Activity state
How to identify that web requests are sent from the library that I've created
how android application reboot itself after catching exception?
Eclipse android libary import keep removing itself
android Button is not working correctly according to result value
Google Play Services AdMob Ads not displaying