Most visited

Recently visited

ListViewAutoScrollHelper

public class ListViewAutoScrollHelper
extends AutoScrollHelper

java.lang.Object
   ↳ android.support.v4.widget.AutoScrollHelper
     ↳ android.support.v4.widget.ListViewAutoScrollHelper


的实现 AutoScrollHelper ,知道如何通过滚动 ListView

Summary

Inherited constants

From class android.support.v4.widget.AutoScrollHelper

Public constructors

ListViewAutoScrollHelper(ListView target)

Public methods

boolean canTargetScrollHorizontally(int direction)

重写此方法以返回目标视图是否可以在某个方向上水平滚动。

boolean canTargetScrollVertically(int direction)

重写此方法以返回目标视图是否可以在某个方向上垂直滚动。

void scrollTargetBy(int deltaX, int deltaY)

重写此方法以按指定数量的像素滚动目标视图。

Inherited methods

From class android.support.v4.widget.AutoScrollHelper
From class java.lang.Object
From interface android.view.View.OnTouchListener

Public constructors

ListViewAutoScrollHelper

ListViewAutoScrollHelper (ListView target)

Parameters
target ListView

Public methods

canTargetScrollHorizontally

boolean canTargetScrollHorizontally (int direction)

重写此方法以返回目标视图是否可以在某个方向上水平滚动。

Parameters
direction int: Negative to check scrolling left, positive to check scrolling right.
Returns
boolean true if the target view is able to horizontally scroll in the specified direction.

canTargetScrollVertically

boolean canTargetScrollVertically (int direction)

重写此方法以返回目标视图是否可以在某个方向上垂直滚动。

Parameters
direction int: Negative to check scrolling up, positive to check scrolling down.
Returns
boolean true if the target view is able to vertically scroll in the specified direction.

scrollTargetBy

void scrollTargetBy (int deltaX, 
                int deltaY)

重写此方法以按指定数量的像素滚动目标视图。

Parameters
deltaX int: The number of pixels to scroll by horizontally.
deltaY int: The number of pixels to scroll by vertically.

Hooray!