Hello,
I come from a background of making Windows Application with Visual Studio, so forgive me if I have some terminologies incorrect.
1:
I am using this example as a starting point for my app: https://www.b4x.com/android/forum/threads/b4x-b4xdrawer-sliding-drawer.97828/
My app is going to have a few "screen" (?) such as a fullscreen map, settings, logs, etc.
Once I add the menu items using
How do I write the code to listen to those click events?
EDIT: I figured out the answer. If you're also wondering how to get the menu item click, it is the ListViewItem_Click event:
I see people have images for those menu items, but the only option I see to add a bitmap image is to use AddTwoLines.
2:
Because the menu is going to be used to show different "screens", is switching screens similar to switching forms like Visual Studio?
For example, in Visual Studio I would do something like,
When I search the forum for having multiple Layout or "screens", people say to use a panel for each "screen" and to simply make the panel Visible = True or False.
The problem with this is, what if I have a bunch of buttons or controls (views) on each panel? Won't it get confusing and messy to work with 3+ panels that have a bunch of views on it?
For example, in the picture below, I have 1 panel with 6 buttons on it in the main window and 2 more copies on the outside.
Would I just work on these panels, making the GUI, and when I'm done just place them all on top of each other?
If I want to work with different Layouts, how would I switch between them and would the B4XDrawer still be present through the different layouts?
All I can say is I am thankful Erel made B4a because I don't think I can ever do Android App Development in Android Studio or other IDE, it's still confusing as heck
I come from a background of making Windows Application with Visual Studio, so forgive me if I have some terminologies incorrect.
1:
I am using this example as a starting point for my app: https://www.b4x.com/android/forum/threads/b4x-b4xdrawer-sliding-drawer.97828/
My app is going to have a few "screen" (?) such as a fullscreen map, settings, logs, etc.
Once I add the menu items using
B4X:
ListView1.AddSingleLine("Home")
EDIT: I figured out the answer. If you're also wondering how to get the menu item click, it is the ListViewItem_Click event:
B4X:
Sub ListView1_ItemClick (Position As Int, Value As Object)
Select Case Value
Case "Home"
MsgboxAsync(Value & " clicked", "")
Case "Settings"
MsgboxAsync(Value & " clicked", "")
End Select
End Sub
I see people have images for those menu items, but the only option I see to add a bitmap image is to use AddTwoLines.
2:
Because the menu is going to be used to show different "screens", is switching screens similar to switching forms like Visual Studio?
For example, in Visual Studio I would do something like,
B4X:
Sub Button1_click
Form2.Show()
Form1.Hide()
End Sub
When I search the forum for having multiple Layout or "screens", people say to use a panel for each "screen" and to simply make the panel Visible = True or False.
The problem with this is, what if I have a bunch of buttons or controls (views) on each panel? Won't it get confusing and messy to work with 3+ panels that have a bunch of views on it?
For example, in the picture below, I have 1 panel with 6 buttons on it in the main window and 2 more copies on the outside.
Would I just work on these panels, making the GUI, and when I'm done just place them all on top of each other?
If I want to work with different Layouts, how would I switch between them and would the B4XDrawer still be present through the different layouts?
All I can say is I am thankful Erel made B4a because I don't think I can ever do Android App Development in Android Studio or other IDE, it's still confusing as heck
Last edited: