I have a ListView that could potentially have hundreds of entries when a selection is made, I have a smooth scoring I am using:
if (lv! = Null) {// Have we created so far? Lv.post (new runnabal) {public void () (lv.smoothScrollToPosition (k);}});} But my users have told me that they like scrolling animation And he would like to go there immediately, so I changed my smooth scroll with
lv.setSelection (k); .. And now it does nothing. FWIW This is happening right after a change notification dataset , during this discussion I will discuss this discussion I came here, on which it is a known problem. Is there any action or am I doing this wrong?
Thank you in advance.
Set documents say that it only scrolls that list when the list view is in contact mode. It may be that the list set may have changed or After set, there might be no other in the list view. Seibek has just been forgotten for the next UI update cycle.
I think you can try an alternative solution by calling delay on setSelection. For example, you can use the delayed method with a delay of 100 milliseconds. Or you can expand the list view and the override layout child or change the data set to calculate the item measure of possibly some possibly related list. At that time this set selection should be safe to call and you do not have to trust the delay.
Comments
Post a Comment