It shouldn't show both. The action mode (contextual action bar) overlays the action bar on the Z axis. If getActionBar() is returning null, either you do not have an action bar, or you are using appcompat-v7, in which case you should be calling getSupportActionBar().
– CommonsWare
that was it, thanks, the fragment is not appcompat-v7 but the activity was
– browep
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
getActionBar()
is returningnull
, either you do not have an action bar, or you are usingappcompat-v7
, in which case you should be callinggetSupportActionBar()
. – CommonsWare