Greetings from Germany,
I have a Problem, i have 4 Color, and 1 Panel.
I add the Panel in my ListView and by adding the next panel into the ListView i will a new Color for my Panel.
I need a Loop, after the 4. Color return to the first color.
I have no Idia how to programm it :/
My Code:
I have a Problem, i have 4 Color, and 1 Panel.
I add the Panel in my ListView and by adding the next panel into the ListView i will a new Color for my Panel.
I need a Loop, after the 4. Color return to the first color.
I have no Idia how to programm it :/
My Code:
B4X:
Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel
Dim p As Panel
p.Initialize("")
'we need to add the panel to a parent to set its dimensions. It will be removed after the layout is loaded.
Activity.AddView(p, 0, 0, Width, Height)
p.LoadLayout("frm_content")
p.RemoveView
'label1 and button1 will point to the last added views.
Return p
End Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("frm_main")
For i = 1 To 10
clv1.Add(CreateListItem($"Item #${i}"$, clv1.AsView.Width, 150dip), 150dip, $"Item #${i}"$)
Next
End Sub
B4X:
Sub Globals
Private pnl_content001 As Panel
End Sub