B4J Library [ABMaterial]: MashApplePanel

Hi there

The MashApplePanel is a somewhat replica of the apple Window panels..

MashApplePanel.gif

It comes with the toolbar, however you can customize the contents of the container as you please using MashPlugIns.

Here is the code to create this Panel.

B4X:
'create the necessary themes, this comes up with the toolbar
    MashPlugIns.AddTheme("darkred",ABM.COLOR_WHITE,ABM.INTENSITY_NORMAL,ABM.COLOR_RED,ABM.INTENSITY_LIGHTEN2)
    MashPlugIns.AddTheme("lightgrey",ABM.COLOR_WHITE,ABM.INTENSITY_NORMAL,ABM.COLOR_GREY,ABM.INTENSITY_LIGHTEN2)
    MashPlugIns.AddTheme("darkred",ABM.COLOR_WHITE,ABM.INTENSITY_NORMAL,ABM.COLOR_RED,ABM.INTENSITY_LIGHTEN2)
    MashPlugIns.AddTheme("lightgreen",ABM.COLOR_WHITE,ABM.INTENSITY_NORMAL,ABM.COLOR_GREEN,ABM.INTENSITY_DARKEN2)
    'create the panel
    Dim pnlapple As MashApplePanel
    pnlapple.Initialize(page,"applepanel")
    'make the panel 6 for all devices, better to make it 12 for small devices
    pnlapple.SetSizes(6,6,6)
    'add a row using the dark red theme
    pnlapple.Content.AddRowsM(1,False,0,0,"").AddCells12(1,"darkred")
    'add a row with 2 cells, 2 + 9 using the different themes
    pnlapple.Content.AddRowsM(1,False,0,0,"").AddCellsOSMP(1,0,0,0,3,3,3,0,0,0,0,"lightgrey").AddCellsOSMP(1,0,0,0,9,9,9,0,0,0,0,"lightgreen")
    'set the height of each of the rows
    pnlapple.Content.SetFixedHeight(1,"42px")
    pnlapple.Content.SetFixedHeight(2,"500px")
    'add the component to the page
    page.Cell(2,1).AddComponent(pnlapple.ABMComp)

Coming to MashPlugIns
 
Top