ListViewAutoScrollHelper
public class ListViewAutoScrollHelper
extends AutoScrollHelper
的实现 AutoScrollHelper
,知道如何通过滚动 ListView
。
Summary
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. |