B4A Library [B4X] [XUI] XQ BreadCrumbs

A simple breadcrumb view, using a horizontal xcustomlistview.

Features:
  • Scrollable, also by code (ScrollToEnd, ScrollToStart)
  • The number of items, can be as many a xCustomListView can hold ;)
  • It has a root and separator FontAwesome/MaterialFont character for style
  • Easy to set background/pressed color, no need to customize the internal Listview
  • Elevation/Shadow is also easy to set from properties
  • Can set the component to remove (or not) the items, right of the one you clicked, so you can also use this component as a horizontal menu.
  • Except from text items, you can also add other views (if you want to)
  • Two ways to add TextItems, with either adjustable size of fixed.
  • TextItems support CSBuilder strings
  • Click and LongClick events
  • Can get Index value of each item. The separator characters don't return an index or value
  • Can add a Tag value/object to each item.
  • You can enable the clicked item to change its style from normal to bold, or not.



View: xq_breadcrumbs
Author: xqtr
Version: 1.00
Depends: XUI, xCustomListView

  • Fields
    • Background As Int 'Color
    • Pressed As Int 'Color
    • Textcolor As Int 'Color
    • Padding As Int 'Left/Right gap between items
    • Elevation As Int
    • Active As Boolean 'Clicked item will be in bold
    • RemoveItem As Boolean 'Remove items from right side of clicked item.
    • ActiveItemIndex As Int 'Read only, return the selected/clicked item index
    • clv As xCustomListView
    • RootChar As Char
    • Seperator As Char
  • Events
    • ItemClick(Index As Int, Value As Object)
    • LongItemClick(Index As Int, Value As Object)
  • Functions
    • ScrollToStart
    • ScrollToEnd
    • Clear
    • AddTextItem(txt As Object, iTag As Object)
    • AddItem(v As B4XView, iTag As Object)
    • AddTextItemWidth(txt As Object, iTag As Object, Width As Int)
    • RemoveItemsFromIndex(index As Int)
    • GetValueAt(Index As Int) As Object



Releases
  • v1.00// 2024-04-05
    • Initial Release


Screenshots

Screenshot_1712330340.png
Screenshot_1712330690.png
Screenshot_1712330686.png



paypal-donate-button-450x174.png
 

Attachments

  • xq_breadcrumbs.b4xlib
    3.2 KB · Views: 31
  • xq_breadcrumbs-example.zip
    18.4 KB · Views: 35

fat32

Member
Updated version 1.01. Unfortunately i can't update my initial post :(

  • v1.01// 2024-04-08
    • + Added RemoveLastItem function
    • + Added Count Property 'Returns the number of items the view contains
    • + Added TextSize Property
    • + Added LastItemClick Event 'To do stuff when you click the last/current item/breadcrumb.
 

Attachments

  • xq_breadcrumbs.b4xlib
    3.6 KB · Views: 31
Top