How to move the B4XBreadCrumb from the last page that contained it (the last one shown) to the current page?
I should write code in the Appear event of the current page, that's the only thing I can figure out
No, also another: that I will most likely have to put the B4XBreadCrumb in a public panel and move this one.
Maybe I can solve it. B4XBreadCrumb doesn't have RemoveViewFromParent (that's why I added a panel (B4XView) that does).
But B4XView.Parent is read-only.
For the moment I have not solved the problem.
I found another one, though : how to detect the page type (its class).
(They are pages created at runtime).
Private Sub B4XPage_Appear
Dim NavigatorIsHere As Boolean
For Each xView As B4XView In Root.GetAllViewsRecursive
If xView.Tag = "Navigator" Then
NavigatorIsHere = True
Exit
End If
Next
If Not(NavigatorIsHere) Then
'Move B4XBreadCrumb to this page.
'1 - Get the last page shown. How to get its type?
'2 - Remove B4XBreadCrumb from its Root
'3 - Add B4XBreadCrumb to this page
End If
I could use a trick: when a page closes, I move B4XBreadCrumb to B4XMainPage.
This way I won't need to detect the type of page that contains the B4XBreadCrumb, the page will always be the B4XMainPage.