I'm using the CustomListView (not the one with the refresh, but the one here: https://www.b4x.com/android/forum/t...xible-list-based-on-scrollview.19567/#content ).
In the library file provided, the example works beautifully and the scrollbar is there.
I want to implement a new instance of the CustomListView programmatically, but the scrollbar doesn't appear when I do. Here's a simple example of the code that demonstrates the issue, which is just a slight modification of the example provided in the library file:
In the library file provided, the example works beautifully and the scrollbar is there.
I want to implement a new instance of the CustomListView programmatically, but the scrollbar doesn't appear when I do. Here's a simple example of the code that demonstrates the issue, which is just a slight modification of the example provided in the library file:
B4X:
Sub Globals
Private clv1 As CustomListView
Private clv2 As CustomListView
Private Label1 As Label
Private Button1 As Button
Private CheckBox1 As CheckBox
Dim ScrollView_1 As CustomListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Activity.LoadLayout("1")
'Activity.RemoveViewAt(1)
'Activity.RemoveViewAt(0)
If FirstTime Then
ScrollView_1.Initialize(Me, "ScrollView_1")
Activity.AddView(ScrollView_1.AsView, 0, 50dip, 100%x, 100%y)
End If
ScrollView_1.AddTextItem("Aaaa", "a")
ScrollView_1.AddTextItem("Aaaa" & CRLF & "Bbbb", "b")
ScrollView_1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc", "c")
ScrollView_1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" , "d")
ScrollView_1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" & CRLF & "Eeee", "e")
'clv1.AddTextItem("Aaaa", "a")
'clv1.AddTextItem("Aaaa" & CRLF & "Bbbb", "b")
'clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc", "c")
'clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" , "d")
'clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" & CRLF & "Eeee", "e")
'For i = 1 To 10
' clv2.Add(CreateListItem($"Item #${i}"$, clv2.AsView.Width, 70dip), 70dip, $"Item #${i}"$)
'Next
End Sub