android


Android actionbar sherlok doesn't show divider


I'm using the sherlok-actionbar and trying to apply a divider between the action buttons.
I have th style but the dividers are not visible, why?
<style name="Theme.SherlockCustom" parent="#style/Theme.Sherlock.Light">
<item name="abBackground">#drawable/actionbar_gradient</item>
<item name="abIcon">#drawable/logo</item>
<item name="abDivider">#drawable/ab_divider</item>
</style>
Thanks!
ActionBarSherlock v3.5 was updated to include the sources from Ice Cream Sandwich for all action-item related views and classes. This means that the rules for placing a divider between two action items follows the same rules as it would on ICS.
A divider would only be shown between the following:
Text-only followed by text-only
Icon-only followed by text-only
Text and icon followed by text-only
If you want to override this behavior (on pre-3.0 only) make the following change to ActionItemView.java:
What you can do is to add a view next to the actionbar item that will look like the separator (works on all Android versions)
<item
android:actionViewClass="com.example.ActionSeparatorView"
android:showAsAction="always"
android:title="#null"/>
and the ActionSeparatorView is a simple extension of the ImageView with the drawable you want to show as a separator
public class ActionSeparatorView extends ImageView {
public ActionSeparatorView (Context context) {
super(context);
setImageDrawable(getResources().getDrawable(R.drawable.separator));
}
}

Related Links

PRISM Xamarin.Forms INavigationService understanding
UC Browser (Android) - version for debugging (UCBrowser_DevTools.apk)
how to prevent reselected checkbox from adding more value
Android more options menu - onOptionsMenuClosed/addOnMenuVisibilityListener
What is $VERSION-SANDBOX when adding midtrans to dependencies
ClassNotFoundException on custom AndroidJUnitRunner
How to find path to android image and create File from Uri
NoSuchMethodError thrown on Realm 3.1
Fill GridLayout cells with ImageView
Detecting Angular Velocity in a React-Native mobile application
Registration Not Running Android Sip Error
Is OnTangoImageAvailableEventHandler() multi threaded?
Setting StrictMode.ThreadPolicy on Application.onCreate is not sufficient
Google Maps V2 position camera to fit entire street
Is there any way to get web URL, author name and other details of web page while copying content (Android and iOS)
Android onClickListener action do not show this message again

Categories

HOME
android
batch-file
cygwin
design-patterns
checkstyle
spark-streaming
pyqt
apache-spark-mllib
yahoo-finance
hessian
requirements
appcelerator
yandex
nested-if
azure-container-service
nfs
barcode
extjs4.2
sendgrid-api-v3
watson-conversation
nancy
flash-player
do-while
wolframalpha
pyramid
lilypond
googlebot
libigl
systemtime
postscript
direct3d11
windows-server-2003
flooding
delimiter
exchangewebservices
send
kudu
deltaspike
openwhisk
roblox
filesystemwatcher
recurrent-neural-network
p4merge
wmp
parser-generator
naming
microsoft-metro
apache-directory
rfc3339
jboss-4.2.x
wcftestclient
openblas
modelsim
ngmaterial
baidu
pacemaker
xcode-server
i386
clipboard.js
riot
gcloud-ruby
qbxml
sapi
themoviedb-api
fiware-monitoring
django-urls
visual-sourcesafe-2005
evolus-pencil
botan
telepat
git-ftp
cakephp-2.7
broadband
qtwebengine
android-cookiemanager
strawberry-perl
insight.database
ss7
malformedurlexception
spring-remoting
bin
away3d
isqlquery
modular
ui-select2
android-icons
intersect
extreme-programming
vfs
pyunit
lambdaj
urlrewriter
pinch
creole
cfwindow
echo3
lxr
wordprocessingml
linfu-dynamicproxy
product-management
soappy
cardspace

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App