I found the following related question: https://www.b4x.com/android/forum/threads/customlistview-scrolltoitem-problem.90996/#post-576490
What I want is to scroll to the last item in the custom listview.
Using xCustomListView v1.54 library
The behavior I am seeing is that the list "jumps" to the item and does not scroll. Additionally the item is placed at the top of the screen, would it be possible to get the item to be at the bottom of the screen.
What I want is to scroll to the last item in the custom listview.
Using xCustomListView v1.54 library
B4X:
Sub scrollToLast
'Scroll to the end of the list only once
If ScrollToEnd Then
If clv_comments.LastVisibleIndex < clv_comments.getsize-1 Then
Sleep(1000) 'put this in as a test
clv_comments.ScrollToItem(clv_comments.GetSize-1) 'this seems to JUMP to the item and puts the last item at the top of the screen making all previous comments not visible.
ScrollToEnd = False
End If
End If
End Sub
The behavior I am seeing is that the list "jumps" to the item and does not scroll. Additionally the item is placed at the top of the screen, would it be possible to get the item to be at the bottom of the screen.