public static interface

DragSortListView.DragScrollProfile

com.mobeta.android.dslv.DragSortListView.DragScrollProfile

Class Overview

Interface for controlling scroll speed as a function of touch position and time. Use setDragScrollProfile(DragScrollProfile) to set custom profile.

Summary

Public Methods
abstract float getSpeed(float w, long t)
Return a scroll speed in pixels/millisecond.

Public Methods

public abstract float getSpeed (float w, long t)

Return a scroll speed in pixels/millisecond. Always return a positive number.

Parameters
w Normalized position in scroll region (i.e. w \in [0,1]). Small w typically means slow scrolling.
t Time (in milliseconds) since start of scroll (handy if you want scroll acceleration).
Returns
  • Scroll speed at position w and time t in pixels/ms.