Is it possible to disable scrolling ListView through drags in Android?
Title pretty much su开发者_开发百科ms it up, I think. I'd like to know if it's possible to disable moving in Android's ListView through dragging (= to leave only flings for moving in the list). Hope I'm not asking something obvious, tried to look for the answer here and elsewhere and found nothing :)
Thanks in advance for any help!
you can implement a onScrollListener on your listView which will always set the position to the first visible item in the list for all the methods except fling where it wont do anything.
Implementation is simple. just setOnScrollListener to a listview reference and the listView has a method to get the first visible position.
精彩评论