Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3c7d429 authored by Romain Guy's avatar Romain Guy
Browse files

Report SCROLL_STATE_IDLE after the user finishes a scroll (not a fling.)

When the user lifts her finger up, AbsListView computes the fling velocity
and report a SCROLL_STATE_FLING if the velocity is high enough. However,
when the fling is not initiated because the velocity is too low (case of
a normal scroll), the idle state was not set nor reported.
parent 8280c2b1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2109,6 +2109,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                            }
                            reportScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
                            mFlingRunnable.start(-initialVelocity);
                        } else {
                            mTouchMode = TOUCH_MODE_REST;
                            reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
                        }
                    }
                } else {