It just has to be me. As you can see, I have struggled with this before. The "GET THIS OUTTA HERE" line was the solution. Darn-close exact same thing works in many other projects. I checked one. Started this project today (7/6/22) as everybody already knows. Most of this log stuff is usually commented out. What is going on?
B4X:
' In B4A it is called when the user clicks on the back key or on the up indicator.
' In B4J it is called when the user clicks on the close button.
Private Sub B4XPage_CloseRequest As ResumableSub
LogSub("B4XPage_CloseRequest")
If Main.ActionBarHomeClicked Then
Log("Main.ActionBarHomeClicked")
Drawer.LeftOpen = Not(Drawer.LeftOpen)
If Drawer.LeftOpen Then
Log("B4XMain drawer open")
ActionButtonIcon(BackArrowIcon)
''Drawer.LeftPanel.BringToFront ' does not work, try it anyway
WhatIsThis.RemoveView ' GET THIS OUTTA HERE
' not crazy about this. should put tags in page so i know which view to remove
' should i remove all views wxcept view(0)?
' why am i doing this? something to do with modules in this page?
'' Dim nViews As Int = Root.NumberOfViews
'' If nViews > 1 Then
'' Dim p As B4XView = Root.GetView(Root.NumberOfViews-1)
'' p.RemoveViewFromParent
'' End If
Else
Log("B4xMain drawer NOT open")
ActionButtonIcon(HamburgerIcon)
End If
Return False
... more stuff