1
I am using this property in manifest.xml:
android:uiOptions="splitActionBarWhenNarrow"
1- The options menu appears at the bottom, following the figure below:
2-And when a click occurs on an item, the action mode appears below:
I would like to keep the first figure(menu at the bottom) and just change the second figure that instead of the action mode appear below, appear on top equal in this image:
Perhaps this is not possible, so I would like the action mode looked like this:
How are you putting the
showAsAction
in your menu items? Could you include the xml that is inflating in Action Mode?– Wakim
posted the sml of the items
– Pedro Rangel
I think by not having space he is forcing the Action Bar to go to the bottom. I could test put
showAsAction="never"
in the@+id/adicionar
, only as a test.– Wakim
this is the same thing... the @Wakim business is to make the action mode stay up and the menu stay down but by the property of the manifest.xml it always makes the two stay at the bottom...
– Pedro Rangel
https://developer.android.com/training/basics/actionbar/overlaying.html
– Tony
@Wakim from what I’m reading I don’t think it’s possible to do this..
– Pedro Rangel
It’s... I think too, I believed it was for lack of space... But if even with space he didn’t leave it up there...
– Wakim
@Wakim I posted a second alternative to the action mode right after the menu bar.. in my last photo how to do?
– Pedro Rangel
No, you can’t change the position of
ActionMode
, that I know of... is using theappcompat
right? You’ve already seen theToolbar
? I guess using him, you can do what you want.– Wakim
@Wakim am using yes.. Toolbar not seen yet...
– Pedro Rangel
So the
Toolbar
is a "substitute" forActionBar
that came from Android Lollipop, you need to include it in your layout using theappcompat v21
(can be at the bottom) and can remove the attributesplitActionBarWhenNarrow
. TheActionMode
It’s not related to him, so he’s on top. More details on: http://android-developers.blogspot.com.br/2014/10/appcompat-v21-material-design-for-pre.html.– Wakim
@Wakim I’ll take a look vlw
– Pedro Rangel
@Wakim ta kind of complicated I have all the support libraries and still not able to use Toolbar.. no layout appears an error The following classes could not be found: -android.support.v7.widget.Toolbar
– Pedro Rangel
How’s your
build.gradle
?– Wakim
@Wakim never used it... what good is it?
– Pedro Rangel
@Wakim now that I remembered on the link that you had passed had a line .. Compile "com.android.support:appcompat-v7:21.0.+"
– Pedro Rangel