简体   繁体   中英

smooth-scrolling ListView in android

I'm having some problems getting smoothScrollBy(int distance, int duration) to work. What I'm trying to do is to center an item in the middle of the listview when user scrolls the listview. There are only 3 visible items at a time, so when user scrolls, the item nearest the center should be smooth-scrolled to, instead of using setSelectionFromTop (which works).

不知道我是否理解正确,但是也许您可以尝试平滑滚动到中间一个上方的项目?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM