Android Question AddMenu3 questions

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
1) Any way to add the menu conditionally, that is enter the activity without the menu item and by a spinner change activate or deactivate the menu item?
2) In Poltrait mode the menu appears allways in the back of the screen and in landscape, in the action bar.
My icon is very small and the actionbar title too but it never appears in the action bar in poltrate mode.
Thanks
 

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
B4X:
  Activity.LoadLayout("posicion")            
  Activity.Title = "PortIt - Tenencia"
  Activity.AddMenuItem3("", "mnuAgregar", LoadBitmap(File.DirAssets, "ic_agregar.png"), True)
 

Attachments

  • ic_agregar.png
    ic_agregar.png
    390 bytes · Views: 114
Upvote 0

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
You are right, I change it to 16x 16 (attached) and same problem, it is still in the bottom bar but smaller...
I've attached a screen image too.
 

Attachments

  • ic_agregar.png
    ic_agregar.png
    284 bytes · Views: 139
  • 2015-06-17-10-45-31[1].png
    2015-06-17-10-45-31[1].png
    311.1 KB · Views: 168
Upvote 0

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Yes I have SetApplicationAttribute(android:uiOptions, "splitActionBarWhenNarrow")
in the manifest.

If I comment it then the icon is shown ok in the app bar, but there are many space to do that with the WhenNarrow option.

This is a Phone, a samsung note 3 running android 4.4.2
 

Attachments

  • 2015-06-17_1009.png
    2015-06-17_1009.png
    41.1 KB · Views: 155
Upvote 0
Top