Stop scrolling in a listview

后端 未结 6 2378
挽巷
挽巷 2021-02-15 16:32

I have in my activity a listview and an imagebutton. When I click the imagebutton I want to go to a specific position in the list (I do this by calling: setSelection(int positio

6条回答
  •  北恋
    北恋 (楼主)
    2021-02-15 17:11

    You have a method for manual scrolling you can call listview.scrollTo(int, int); But I do not have idea how can you calculate how much to scroll, I mean how to calculate the arguments of the method. Also this doesn't stop scrolling it just positions you at a specific place and then stop scrolling, so you might have a little flicker... If doesn't solve you problem at list will give some hints.

    more about the method

提交回复
热议问题