Private Sub Page1_Resize(Width As Int, Height As Int)
Label1.SizeToFit
End Sub
Thanks so much! I will go through the video tutorial.You must learn about the resize event and how it is handled in B4i: https://www.b4x.com/android/forum/t...mageview-in-customlistview.98235/#post-619467
This will work:
B4X:Private Sub Page1_Resize(Width As Int, Height As Int) Label1.SizeToFit End Sub
You must learn about the resize event and how it is handled in B4i: https://www.b4x.com/android/forum/t...mageview-in-customlistview.98235/#post-619467
This will work:
B4X:Private Sub Page1_Resize(Width As Int, Height As Int) Label1.SizeToFit End Sub
Private Sub Application_Start (Nav As NavigationController)
'SetDebugAutoFlushLogs(True) 'Uncomment if program crashes before all logs are printed.
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
Page1.RootPanel.LoadLayout("Page1")
NavControl.ShowPage(Page1)
addItem
End Sub
Sub addItem
For i = 1 To 6
Private pArticleOverview As B4XView = xui.CreatePanel("") ' declared public hence obsoliete declaration here
pArticleOverview.SetLayoutAnimated(0,0,0,100%x,80)
pArticleOverview.LoadLayout("clvLayout")
clv1.Add(pArticleOverview, i)
Next
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
Label1.SizeToFit
lblLayout.SizeToFit
End Sub
There is no such thing. A XUI panel is a regular panel.XUI panel
There is no such thing. A XUI panel is a regular panel.
Your code cannot work as you are only calling SizeToFit on the last added item.
Why aren't you using CLV.AddTextItem? It will resize the label for you.