Android Question [Solved] B4XBreadCrumb and B4XPages

LucaMs

Expert
Licensed User
Longtime User
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.


P.S.

2. Another option is to take the panel from the previous page and move it to the next page. It is simpler than it sounds.

:)
 

LucaMs

Expert
Licensed User
Longtime User
B4X:
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

:confused:
 
Upvote 0

epiCode

Active Member
Licensed User
Gem of a monologue @LucaMs
btw what was the solution?
Also you have quoted Erel in FP. Is there a detailed discussion elsewhere or context ?
I am looking at a similar challenge to recreate part of UI in every b4xpage without duplicating code in every b4xpage.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Gem of a monologue @LucaMs
btw what was the solution?
Also you have quoted Erel in FP. Is there a detailed discussion elsewhere or context ?
I am looking at a similar challenge to recreate part of UI in every b4xpage without duplicating code in every b4xpage.
I don't remember at all. Besides, I've never used B4XBreadCrumb; I probably did it to help some B4X member.

B4XViews have the RemoveViewFromParent method, so you can use this, knowing which B4XPage contains the B4XView you want to "import" into the page to display.
Remember that a B4XPage, once created, always exists, even if it is not visible (this is a useful indication to solve the problem).

If you have an example, test project, attach it and we will help you.
 
Upvote 0
Top