ABMCustomCard allows you to build revealing cards using all kind of other ABMComponents.
Here is an example where on the front we have a ABMChart, an ABMLabel with flowText as title and some custom buttons. When revealed, we have an ABMEditor.
Alwaysbusy
Here is an example where on the front we have a ABMChart, an ABMLabel with flowText as title and some custom buttons. When revealed, we have an ABMEditor.
B4X:
Dim card As ABMCustomCard
card.Initialize(page, "custcard", "")
' create a line chart
Dim chart1 As ABMChart
chart1.Initialize(page, "chart1", ABM.CHART_TYPELINE, ABM.CHART_RATIO_GOLDENSECTION, "chart1theme")
' add the labels
chart1.AddLabels(Array As String("Mon", "The", "Wed", "Thu", "Fri", "Sat", "Sun"))
' set some options
chart1.OptionsLine.FullWidth=True
chart1.OptionsLine.ChartPaddingRight=60 ' because we set fullwidth, we have to adjust so the final label also fits
chart1.OptionsLine.Serie(ABM.CHART_SERIEINDEX_A).LineSmooth = ABM.CHART_LINESMOOTH_NONE
chart1.OptionsLine.Serie(ABM.CHART_SERIEINDEX_C).LineSmooth = ABM.CHART_LINESMOOTH_SIMPLE
chart1.OptionsLine.Serie(ABM.CHART_SERIEINDEX_C).ShowArea = True
chart1.AddPluginDefinition("Chartist.plugins.ctPointLabels({textAnchor: 'middle'})")
' add some series
Dim SerieA As ABMChartSerie
SerieA.InitializeForLine(ABM.CHART_SERIEINDEX_A)
SerieA.SetValues(Array As Int(30,50,70,80,ABM.CHART_NULLVALUE,140,170))
chart1.AddSerie(SerieA)
Dim SerieC As ABMChartSerie
SerieC.InitializeForLine(ABM.CHART_SERIEINDEX_C)
SerieC.SetValues(Array As Int(100,120,180,150,190,100,70))
chart1.AddSerie(SerieC)
' add the chart to the top part of the card
card.SetFrontTopComponent(chart1)
' add a label
Dim FrontTitle As ABMLabel
FrontTitle.Initialize(page, "fronttitle", "A TITLE USING TEXTFLOW{BR}With some sub text", ABM.SIZE_SPAN, True, "")
FrontTitle.IsFlowText = True
' add the label to the title part of the card
card.SetFrontTitleComponent(FrontTitle)
' add a editor
Dim back As ABMEditor
back.Initialize(page, "editor", True, True, "editor")
back.SetHTML("<div>Alain is aan het testen</div>")
' add the editor to the 'back' of the card
card.SetBackComponent(back)
' make some buttons as actions
Dim btn2 As ABMButton
btn2.InitializeRaised(page, "btn2", "fa fa-home", ABM.ICONALIGN_LEFT, "BUTTON", "bluegrey")
card.AddAction(btn2)
Dim btn3 As ABMButton
btn3.InitializeRaised(page, "btn3", "mdi-image-palette", ABM.ICONALIGN_RIGHT, "BUTTON", "bluegrey")
card.AddAction(btn3)
' add the card to the page
page.Cell(2,1).AddComponent(card)
Alwaysbusy