B4J Question [SOLVED] Customlistview jumps to top

Revisable5987

Member
Licensed User
If I set a button as Visible = False the CLV will jump to the top.

I can make the clv return to the correct place with 'VPosition' but the list first moves to the top and then to where I want it.

Is there anything I can do to stop the clv moving in the first place? using sleep(300) helps, but not always.

Example project attached. Scroll to the bottom and press the button.
 

Attachments

  • example.zip
    3.4 KB · Views: 372

gregchao

Active Member
Licensed User
Longtime User
I ran into a similar problem where I wanted to jump to the bottom of list and it would not respond. After stuggling a little, I solved it by using:

B4X:
Dim n As Int = CLVConversation.size         
CLVConversation.JumpToItem(n - 1)
'next 2 lines needed to ensure jumpto last line
Sleep(0)
CLVConversation.JumpToItem(n - 1)

I am not quite sure why it works though....
 
Upvote 0
Top