Just started with B4XPages and added a simple custom menubar, not based on the built-in Android menubar, but based on
layouts with panels, labels and buttons.
As far as I understand most apps will access the built-in menubar in some form, but I may have this wrong.
In my old, non-B4xPages app all the app screens were based on panels, called from Main. Only one panel would
be visible, so picking a screen was done by setting the particular panel visible and made all the other ones invisible.
For the menu I was using AppCompat.
Now if I do this in B4XPages and not using AppCompat, but this custom menubar and I set the required screen by creating and showing a B4X page
and adding that custom menubar, it seems there will be a lot of code duplication, to do with the menubar.
Attached a simple demo project that demonstrates this.
There is zipped .csv file as well that setsup the menu, including the overflow menu.
I can't add this .csv to DirAssets as there will be an error, file not found, even although the file is definitely there.
I think this is to with a permission problem, but not sure about that.
In any case the .csv has to be put in folder in Internal Storage, and I called that folder PhonePats.
With all this I have 2 questions:
1. Is there any problem with not using the built-in Android menubar/toolbar?
2. What would be the best way to avoid the code duplication to do with the custom menubar?
Thanks for any further insight.
RBS
layouts with panels, labels and buttons.
As far as I understand most apps will access the built-in menubar in some form, but I may have this wrong.
In my old, non-B4xPages app all the app screens were based on panels, called from Main. Only one panel would
be visible, so picking a screen was done by setting the particular panel visible and made all the other ones invisible.
For the menu I was using AppCompat.
Now if I do this in B4XPages and not using AppCompat, but this custom menubar and I set the required screen by creating and showing a B4X page
and adding that custom menubar, it seems there will be a lot of code duplication, to do with the menubar.
Attached a simple demo project that demonstrates this.
There is zipped .csv file as well that setsup the menu, including the overflow menu.
I can't add this .csv to DirAssets as there will be an error, file not found, even although the file is definitely there.
I think this is to with a permission problem, but not sure about that.
In any case the .csv has to be put in folder in Internal Storage, and I called that folder PhonePats.
With all this I have 2 questions:
1. Is there any problem with not using the built-in Android menubar/toolbar?
2. What would be the best way to avoid the code duplication to do with the custom menubar?
Thanks for any further insight.
RBS