Android Question Unexpected behavior of BBListItem

Hanz

Active Member
I don't know if anyone already encountered this. This is just a chat application using BBListItem, I have a customlistview and its listitems contain a BBListItem. floattextfield is used for user input. When the floattextfield is focused, the listview changes its size and the floattextfield changes its position to accomodate the keyboard. The problem is, the text of the BBListitem in the last listitem of the listview disappears after the new listitem is added at the end. Assuming I have 2 lisitems and I added a third one, the text in the BBListItem in the second lisitem disappears. This happens when the keyboard is present. Otherwise, everything is okay.

Other items such as images and label are not erased--just the text. Furthermore, if the text is short, such as one or two lines, they reappear after I slide down and up the listview. But if the text is two paragraphs, the text permanently disappears.

Anyone who had encountered and addressed accordingly this issue?

Thanks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Tip: don't resize the CLV. You will get better UX by adding a gap at the end of the CLV and scroll it when needed.

BBListItem lazy draws the text. It is done when you call ParentScrolled. I guess that you should call ParentScrolled again, in the case you described. You can also force it to draw the complete item with UpdateVisibleRegion(0, BBListItem.mBase.Height)
 
Upvote 0

Hanz

Active Member
Thanks Erel,

I resize the CLV because I followed the example provided by this link.
B4X:
https://www.b4x.com/android/forum/threads/responsive-chat-example.110959/#content
If I will not resize it, how will go over the resizing of floattextfield, panel, and listview when the keyboard appears? Is the last paragraph of your answer my way through it?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top