My app puts three items in the top right corner of the Activity using this:
Two are Icons and the third is the text "SAVE".
Normally, you would want to have the SAVE item in the top right corner of the activity. So I add them to the activity line this:
- Icon 1
- Icon 2
- SAVE
And larger screen devices can display all three, with "SAVE" and the right-most item.
But, on smaller devices, they can only fit 2 items, so since the auto-3-dot menu item counts as one item, the activity will only show the Icon 1 and the three dots. Then when you hit the 3-dots, the ICON1 and SAVE appear in the drop-down menu.
But I would rather have the SAVE item be the one that is displayed in the titlebar, and have Icon1 and Icon2 be in the drop-down menu. So, this would require changing the loading order to:
- SAVE
- Icon 1
- Icon 2
So, is there a way to determine ahead of time how many items the current device can display in the title/actionbar *before* I load up the menu so I can select the loading order that best works for what I want to do?
B4X:
Activity.AddMenuItem3
Two are Icons and the third is the text "SAVE".
Normally, you would want to have the SAVE item in the top right corner of the activity. So I add them to the activity line this:
- Icon 1
- Icon 2
- SAVE
And larger screen devices can display all three, with "SAVE" and the right-most item.
But, on smaller devices, they can only fit 2 items, so since the auto-3-dot menu item counts as one item, the activity will only show the Icon 1 and the three dots. Then when you hit the 3-dots, the ICON1 and SAVE appear in the drop-down menu.
But I would rather have the SAVE item be the one that is displayed in the titlebar, and have Icon1 and Icon2 be in the drop-down menu. So, this would require changing the loading order to:
- SAVE
- Icon 1
- Icon 2
So, is there a way to determine ahead of time how many items the current device can display in the title/actionbar *before* I load up the menu so I can select the loading order that best works for what I want to do?
Last edited: