B4J Library [ABMaterial]: MashSlidingPanels

Hi y'all


This is a custom component to show SlidingPanels using materialize framework. That means for this to work you need to include the js and css files from materialize.

My wish for this is the ability to add ABMContainers to this to create a fully fledged component. I dont know how to add that to custom components, unless I create a custom container myself. With the current ABMContainer being powerful as it it already, I wont even attempt to 'clone' it. Hopefully one day this kind of component can be part of ABMaterial.

This one just demonstrates adding a simple Container with a two labels.

You need to add this to your page build.

B4X:
page.AddExtraCSSFile("custom/materialize.css")
    page.AddExtraJavaScriptFile("custom/materialize.js")

NB: Adding this might just break your ABMaterial WebApp as ABMaterial uses an 'adjusted' version of the materialize framework, so USE AT OWN RISK.

Source code attached..

B4X:
ABMShared.AddTheme("whitered","white","","red","")
    ABMShared.AddTheme("whiteamber","white","","amber","")
    ABMShared.AddTheme("whitegreen","white","","green","")
    ABMShared.AddTheme("whiteblue","white","","blue","")
    ABMShared.AddTheme("whiteorange","white","","orange","")
   
    mashc3.Initialize(page,"mashc3",True)
    mashc3.Center = True
    'lets test with an image
    mashc3.AddContainer("","#one1","Sunday","This is the description for page 1","whitered")
    mashc3.AddContainer("","#one2","Monday","This is the description for page 2","whiteamber")
    mashc3.AddContainer("","#one3","Tuesday","This is the description for page 3","whitegreen")
    mashc3.AddContainer("","#one4","Wednesday","This is the description for page 4","whiteblue")
    mashc3.AddContainer("","#one5","Thursday","This is the description for page 5","whiteorange")
    mashc3.AddContainer("","#one6","Friday","This is the description for page 5","whitered")
    mashc3.AddContainer("","#one7","Saturday","This is the description for page 5","whitegreen")
    page.Cell(4,1).addcomponent(mashc3.ABMcomp)
 

Attachments

  • MashCarousel.bas
    4.8 KB · Views: 476
Top