Bug? About CustomListView display error

xky

Member
Licensed User
Longtime User
In your sample, if you change the add order(the item height not lager than last added) like:
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc", "c")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb", "b")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" , "d")
    clv1.AddTextItem("Aaaa" & CRLF & "Bbbb" & CRLF & "Cccc" & CRLF & "Dddd" & CRLF & "Eeee", "e")
    clv1.AddTextItem("Aaaa", "a")
 
    'Second list is created programmatically.
    'Create 20 items made of a label, button and checkbox.
    clv3.Initialize(Me, "clv3")
    Activity.AddView(clv3.AsView, 0, 50%y, 100%x, 50%y)
    For i = 1 To 10
        clv3.Add(CreateListItem("Item #" & i, clv3.AsView.Width, 50dip), 50dip, "Item #" & i)
    Next
End Sub
The Itemheight seem to be equal the last added item, and cause display error, I don't know why.
Your Sample is here:http://www.b4x.com/android/forum/th...ew-a-flexible-list-based-on-scrollview.19567/
 

xky

Member
Licensed User
Longtime User
See here.All the pannel Height seem to be same.
By the way, it not happen at once. First, the display is good, after 1-2 seconds, screen changed like this.
I try it on my phone and pad, they are the same resault.
and I only changed the Add order, no others change about the sample.
 

Attachments

  • Screenshot_2013-09-26-16-32-47.png
    Screenshot_2013-09-26-16-32-47.png
    152.5 KB · Views: 190
Last edited:

xky

Member
Licensed User
Longtime User
I found the problem: That is if set the textbackgroundcolor to colors.transport, then it happened. Change to other color will be OK.
My project is your sample, only changed as before posted.
 
Top