android


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

Related Links

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 1.2.0.1 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

Categories

HOME
go
c99
google-spreadsheet
numbers
mstest
sublimetext
vscode-extensions
google-cloud-datalab
crystal-reports-2013
vert.x
lanczos
flume
performancepoint
alamofire
why3
intercom
pybossa
code-generation
enterprise-architect
docx
do-while
easyphp
kendo-mobile
jquery-ias
backpack-for-laravel
pagespeed
underscore.js
postback
dst
cart
angularjs-material
card.io
login-script
sendbird
indy10
reverse
roblox
latitude-longitude
openerp-7
reactivekit
nohup
odoo-website
portforwarding
congestion-control
apache-directory
apache-spark-dataset
dynamic-linq
builder
serde
page-replacement
quicktime
type-theory
google-cloud-console
cifilter
xdoclet
google-query-language
fuzzywuzzy
realsense
phpgrid
custom-errors
opserver
sapscript
dronekit-android
mirror
zend-currency
primitive-types
metatrader5
easyrtc
formview
entry-point
lambda-architecture
rcaller
websphere-esb
clickbank
amslidemenu
jammer
merb
pclzip
fb.ui
sqlclr
curb
qtconcurrent
subgraph
jdb
jquery-address
hibernateexception
gobject-introspection
mysql-error-1205
django-paypal
appledoc
drupal-fivestar
opml
pagemethods
django-piston
asynchronous-wcf-call
wysiwym
fdf

Resources

Encrypt Message