Android Question Issues about B4XBreadCrumb

Discussion in 'Android Questions' started by asales, Jun 3, 2019.

  1. asales

    asales Well-Known Member Licensed 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
     
  2. inakigarm

    inakigarm Well-Known Member Licensed User

    If I understand correctly...

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

    In Globals:
    Code:
    lastcrumbstate as Int
    In BreadCrumb Event_Click

    Code:
    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 ..
     
    asales likes this.
  3. Erel

    Erel Administrator Staff Member Licensed 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:
    Code:
    Sub B4XBreadCrumb1_CrumbClick (Crumbs As List)
       B4XBreadCrumb1.Items = Crumbs
    End Sub
     
    Last edited: Jun 4, 2019
  4. asales

    asales Well-Known Member Licensed User

    OK

    The same behavior of the gif image, but the code from the post above works.
    V2LrgKPeKn.gif
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice