I am transferring a large Visual Studio app to Android and have come across a problem I cannot solve, so if anyone can help please respond.
I have a few panels, StartUp, Welcome and Setup, the startup loads and shows the progress of loading 8 or 9 files and connecting to a Database then Welcome is shown, on a Visual Studio system I can define a menu and press a menu item to get to the Setup screen so that the user can configure the application, In B4A I can add menu items in the activity create okay but the click event does not seem to happen, I have put the AddMenuItems instructions in Activity_Create. I have initialized items but nothing seems to solve it.
Also the Menu is hidden, the only way I could find to display it is to force it up at the end of the load sequence (but that only brings it up once) or have a Button, checkbox or radio item from which I can control the menu display, that is okay, tick the box to see the setup menu, but as I said the menu click events are not firing and to uncheck the check box takes two screen taps, the first clears the menu without my software intervention (even though I have put in code in the FrameWelcome click event to clear the check box, it is never called) but the check box needs a second screen tap to reset it, any ideas as to what I am doing wrong.
Activity.AddMenuItem("Setup","Setup_Click")
Activity.AddMenuItem("Manual Login","Login_Click")
Activity.AddMenuItem("Exit","Exit_Click")
Sub CheckMenu_CheckedChange(Checked As Boolean)
If Checked = True Then
Activity.OpenMenu
Else If Checked = False Then
Activity.CloseMenu
End If
End Sub
Sub FrameWelcome_Click
CheckMenu.Checked = False
End Sub
Sub Setup_Click 'Menu Item – Setup
FrameWelcome.Visible = False
FrameSetup.Visible = True
FrameSetup.BringToFront
Activity.CloseMenu
End Sub
I have a few panels, StartUp, Welcome and Setup, the startup loads and shows the progress of loading 8 or 9 files and connecting to a Database then Welcome is shown, on a Visual Studio system I can define a menu and press a menu item to get to the Setup screen so that the user can configure the application, In B4A I can add menu items in the activity create okay but the click event does not seem to happen, I have put the AddMenuItems instructions in Activity_Create. I have initialized items but nothing seems to solve it.
Also the Menu is hidden, the only way I could find to display it is to force it up at the end of the load sequence (but that only brings it up once) or have a Button, checkbox or radio item from which I can control the menu display, that is okay, tick the box to see the setup menu, but as I said the menu click events are not firing and to uncheck the check box takes two screen taps, the first clears the menu without my software intervention (even though I have put in code in the FrameWelcome click event to clear the check box, it is never called) but the check box needs a second screen tap to reset it, any ideas as to what I am doing wrong.
Activity.AddMenuItem("Setup","Setup_Click")
Activity.AddMenuItem("Manual Login","Login_Click")
Activity.AddMenuItem("Exit","Exit_Click")
Sub CheckMenu_CheckedChange(Checked As Boolean)
If Checked = True Then
Activity.OpenMenu
Else If Checked = False Then
Activity.CloseMenu
End If
End Sub
Sub FrameWelcome_Click
CheckMenu.Checked = False
End Sub
Sub Setup_Click 'Menu Item – Setup
FrameWelcome.Visible = False
FrameSetup.Visible = True
FrameSetup.BringToFront
Activity.CloseMenu
End Sub