Alberto Michelis Well-Known Member Licensed User Longtime User Jun 16, 2015 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2015 #2 1) Not unless you create a custom action bar. 2) Can you post the relevant code and the icon file? Upvote 0
Alberto Michelis Well-Known Member Licensed User Longtime User Jun 16, 2015 #3 Code: Copy Activity.LoadLayout("posicion") Activity.Title = "PortIt - Tenencia" Activity.AddMenuItem3("", "mnuAgregar", LoadBitmap(File.DirAssets, "ic_agregar.png"), True) Attachments ic_agregar.png 390 bytes · Views: 442 Upvote 0
Code: Copy Activity.LoadLayout("posicion") Activity.Title = "PortIt - Tenencia" Activity.AddMenuItem3("", "mnuAgregar", LoadBitmap(File.DirAssets, "ic_agregar.png"), True)
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2015 #4 Try to use a 16x16 icon instead. Upvote 0
Alberto Michelis Well-Known Member Licensed User Longtime User Jun 16, 2015 #5 tride with this and same problem... Attachments ic_agregar.png 262 bytes · Views: 414 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 17, 2015 #6 Are you sure that it is 16x16? Looks like it is 24x24. Can you upload it in a zip file? Upvote 0
Alberto Michelis Well-Known Member Licensed User Longtime User Jun 17, 2015 #7 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 284 bytes · Views: 413 2015-06-17-10-45-31[1].png 311.1 KB · Views: 456 Upvote 0
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.
Erel B4X founder Staff member Licensed User Longtime User Jun 17, 2015 #8 Sorry I didn't understand that it appears in the bottom bar. Have you set this attribute in the manifest editor: SetApplicationAttribute(android:uiOptions, "splitActionBarWhenNarrow") ? Is this a phone or a tablet? Upvote 0
Sorry I didn't understand that it appears in the bottom bar. Have you set this attribute in the manifest editor: SetApplicationAttribute(android:uiOptions, "splitActionBarWhenNarrow") ? Is this a phone or a tablet?
Alberto Michelis Well-Known Member Licensed User Longtime User Jun 17, 2015 #9 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 41.1 KB · Views: 485 Upvote 0
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
Erel B4X founder Staff member Licensed User Longtime User Jun 17, 2015 #10 If you set this attribute then the menu will appear at the bottom of the screen in portrait mode. This is the purpose of this attribute. Upvote 0
If you set this attribute then the menu will appear at the bottom of the screen in portrait mode. This is the purpose of this attribute.
Alberto Michelis Well-Known Member Licensed User Longtime User Jun 17, 2015 #11 As I read, this may happend only if theres no place for the icons in the toolbar. Upvote 0