Android Question Issues about B4XBreadCrumb

asales

Expert
Licensed User
Longtime User
I tried the new XUIViews component, but I if I click in the "Item1" the others items are hide.
crumbs1.jpg


I don't know why and how to show it agian, like the image of the example.
V2LrgKPeKn.gif
 

inakigarm

Well-Known Member
Licensed User
Longtime User
If I understand correctly...

Add the items to the BreadCrum control in Designer: ---> Item1|Item2|Item3|Item4

In Globals:
B4X:
lastcrumbstate as Int

In BreadCrumb Event_Click

B4X:
If Crumbs.Size=1 Then
    If lastcrumbstate=Crumbs.Size-1 Then
        For i = 2 To 4
            Crumbs.Add("Item " & i)
        Next
    Else
        lastcrumbstate=Crumbs.Size-1
    End If
Else
    lastcrumbstate=-1
End If

B4XBreadCrumb1.Items = Crumbs

Sure there's another way to do it ..
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Nothing happens automatically.
2. What do you want to do when the user clicks on an item?

If you want the "standard behavior" of bread crumb controls which means that the items on the right are removed:
B4X:
Sub B4XBreadCrumb1_CrumbClick (Crumbs As List)
   B4XBreadCrumb1.Items = Crumbs
End Sub
 
Last edited:
Upvote 0
Top