Android Question Breadcrumbs Control

Discussion in 'Android Questions' started by DawningTruth, Jun 1, 2019.

Tags:
Thread Status:
Not open for further replies.
  1. DawningTruth

    DawningTruth Active Member Licensed User

    I an trying to create a breadcrumbs control like this:

    [​IMG]

    I see there is no standard way to do this in B4A, so I presume I need to write it myself.

    My question is, how do you create the irregular shaped chevrons without resorting to images. Any suggestions?
     
  2. mcqueccu

    mcqueccu Active Member Licensed User

    DawningTruth likes this.
  3. DawningTruth

    DawningTruth Active Member Licensed User

  4. DonManfred

    DonManfred Expert Licensed User

    i don´t think that a controlsfx component works on Android as java.fx components are not available in Android.
     
    DawningTruth likes this.
  5. LucaMs

    LucaMs Expert Licensed User

    If I'm not mistaken, that would be the classic case in which to use the (infamous) nine-patches.

    Perhaps, however, the best thing would be to follow the @mcqueccu's advice, BitmapCreator.
     
    DawningTruth likes this.
  6. DawningTruth

    DawningTruth Active Member Licensed User

    Thx All, yes I'm going to give @mcqueccu's BitmapCreator a go.
     
  7. Erel

    Erel Administrator Staff Member Licensed User

  8. AnandGupta

    AnandGupta Active Member Licensed User

    DawningTruth and angel_ like this.
  9. LucaMs

    LucaMs Expert Licensed User

    I have to go immediately to look at the source, to know how Erel did it so quickly (it's probably time for me to go and see how to use BitmapCreator :D).

    Just one thing: why does the click event return the list of crumbs instead of the index of the one clicked?
     
    DawningTruth and jimmyF like this.
  10. LucaMs

    LucaMs Expert Licensed User

    Done. BitmapCreator has nothing to do with it; the method used is:

    cvs.DrawPath
     
    DawningTruth likes this.
  11. Erel

    Erel Administrator Staff Member Licensed User

    BreadCrumb <> random set of buttons.

    The buttons represent a parent -> child path. It is like a specific path in a tree.
    The last item might not be unique and it is also not more important than the other items above it.
    Another advantage of passing a list in the event is that it is very simple to remove the items underneath the current one. It doesn't happen automatically.
    Code:
    B4XBreadCrumb.Items = Crumbs
     
  12. DawningTruth

    DawningTruth Active Member Licensed User

    LucaMs likes this.
  13. DawningTruth

    DawningTruth Active Member Licensed User

    @Erel, I have looked at the post and have a few very basic questions:

    1. How do I actually get a copy of XUI V2.10?
    2. How do I setup the view? I assume I do it through the Designer.
    3. Is there a way to programmatically set the color of each chevron? For instance: Level 1 = Red Alpha 255, Level 2 = Red Alpha 220, Level 3 = Red Alpha 200 etc...

    Thx your assistance is greatly appreciated.
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    DawningTruth and LucaMs like this.
  15. LucaMs

    LucaMs Expert Licensed User

    DawningTruth likes this.
  16. DawningTruth

    DawningTruth Active Member Licensed User

    Thx Erel, with the example file managed to get a workable Breadcrumb up and running.

    Question: How do you edit a Lib File? I see if I double click on it, it does not open in B4A. And opening from the B4A file menu it is asking for .b4a files.
     
  17. Erel

    Erel Administrator Staff Member Licensed User

    You should start a new thread for a new question.
     
    DawningTruth likes this.
Thread Status:
Not open for further replies.
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