TharakaNirmana TharakaNirmana - 5 months ago 15
Android Question

Stop scrolling in a listview when user touches the list - android

I have a list view that contains about 30 items. When I scroll it down it just goes to the very bottom of the list and does not stop when the user touches the list.

Is there a method to stop the scrolling when the list view is touched and at the same time user should be able to navigate using onItemClick(already handled)..

Thank you!


Try this smooth scrolling

 public boolean onTouchEvent(MotionEvent ev) 
 switch (ev.getAction()) 
    case MotionEvent.ACTION_UP: this.smoothScrollBy(0, 0); 
    return super.onTouchEvent(ev); }