I want to change the font and text size of the items in a B4XListTemplate. I tried all the 'options.' members below, but none works.
B4X:
Private Dialog As B4XDialog
Private options As B4XListTemplate
Dialog.Initialize (Activity)
Dialog.TitleBarColor=xui.Color_Red
options.Initialize
options.CustomListView1.GetPanel(0).GetView(0).Font =xui.CreateDefaultFont(26) 'no good
options.CustomListView1.GetPanel(0).Font =xui.CreateDefaultFont(26)'no good
options.CustomListView1.GetBase.GetView(0).Font = xui.CreateDefaultFont(26) 'no good
options.mBase.GetView(0).TextSize=26 'no good
options.mBase.GetView(0).GetView(0).font=xui.CreateDefaultFont(26) 'no good
I keep guessing with so many members and hierarchical layers available, hoping one works.
Thank you.
i don't think clv support changing font for text items but you can use csBuilder to change the font
B4X:
Dim cs As CSBuilder
options.Options = Array(cs.Initialize.Color(Colors.Red).Typeface(Typeface.MONOSPACE).Append("cat").PopAll, "Dog", "Fish", "Crocodile")
I see. It is a Label and not B4XView. Correct code:
B4X:
#if B4J
ListTemplate.CustomListView1.DesignerLabel.Style = ""
#End If
Dim l As B4XView = ListTemplate.CustomListView1.DesignerLabel
l.Font =xui.CreateDefaultFont(26)