B4J Library [ABMaterial]: MashListView

Hi there


The MashListView is a simple ListView for your ABMaterial WebApps that can help you with one thing, i.e. grouping items together based on the title.

This component used only two methods to add items, one can be an icon based item and another can be an image. Both of these can can a title, description, side component or badge.

Adding your code to the page is easy..

B4X:
Dim mlistView As MashListView
    mlistView.Initialize(page,"mlistView")
    mlistView.GroupItems = True
    mlistView.AddItemIcon("icon",MashPlugIns.MaterialIcons.mdi_access_time,"AddItem","Description",True,"mutedtext","successtext","10",True,"")
    mlistView.AddItemAvatar("mashy","../images/sponge.png","Mashy","Loving ABMaterial",False,"successtext","",False,"")
    mlistView.AddItemAvatar("eric","../images/eric.png","Eric","A comedian",False,"successtext","South Central",False,"")
    mlistView.AddItemAvatar("kenny","../images/kenny.png","Kenny","",False,"successtext","",False,"")
    mlistView.AddItemAvatar("kyle","../images/kyle.png","Kyle","",False,"successtext","Hey there!",False,"")
    mlistView.AddItemAvatar("mommy","../images/mom.jpg","Mommy","",False,"successtext","",False,"")
    page.Cell(3,1).AddComponent(mlistView.ABMComp)

Trapping your click event also can be done by processing the itemID of the item you added...

B4X:
Sub mlistView_click(value As Map)
    Dim valuex As String = value.Get("value")
    page.Msgbox("",valuex,"","OK",False,"","")
End Sub

By turning GroupItems to True, the list as per video play is shown, however you can also add your own groups and add items after you have added a group.

An ungrouped MashListView

MashListView1.png


For MashPlugIns
 
Top