Good night, which view should I use to list data ??
CustomListView, ListView ??
My app will list more than 5000 items view
Does anyone have any examples of how to use CustomListView with database.
I need to list the fields with the following layout in the ListView or CustomListView
Bar code :
7892364591238
Qty:
4
Can you do that ??
If the items are simple enough then you can use ListView:
Example:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
ListView1.SingleLineLayout.ItemHeight = 120dip
ListView1.SingleLineLayout.Label.Left = 10dip
Dim cs As CSBuilder
For i = 1 To 100
cs.Initialize
cs.Size(17)
cs.Color(0xFFC0BFC0).Append("Bar code:").Append(CRLF).Pop
cs.RelativeSize(0.8).VerticalAlign(10dip).Append("7892364591238").Append(CRLF).Pop.Pop.Append(CRLF)
cs.Color(0xFFC0BFC0).Append("Qty:").Append(CRLF).Pop
cs.RelativeSize(0.8).VerticalAlign(10dip).Append(i).Append(CRLF).Pop.Pop
cs.PopAll
ListView1.AddSingleLine(cs)
Next
End Sub
And the user, in the worst case scenario, have to scroll the view about 4990 times; I think this is not a good choice.
For example, for less than 300 items (countries) I use my lib SuggestionsEditText; anyway, if you don't want the user should type anything, I think you have other ways.