Public static interfaceabslistview. onscrolllistener
Android. widget. abslistview. onscrolllistener |
Class Overview
The interface defined to implement the callback function during list or grid scrolling.
Overview
Constant |
Int |
Scroll_state_fling |
You have previously performed quick scrolling through touch scrolling. |
Int |
Scroll_state_idle |
The view does not scroll. |
Int |
Scroll_state_touch_scroll |
The user scrolls through the touch and the finger does not exit the screen. |
Public Method |
Abstract void |
Onscroll (abslistview view, int firstvisibleitem, int visibleitemcount, int totalitemcount) calls the callback function when the list or grid scrolling is completed. |
Abstract void |
Onscrollstatechanged (abslistview view, int scrollstate) the callback function is executed when the list view or grid view is rolling. |
Constant Public static final int scroll_state_fling added to API Level 1
You have previously performed quick scrolling through touch scrolling. The scroll animation slides toward the stop point.
Constant Value: 2 (0x00000002) public static final int scroll_state_idle added to API Level 1
The view does not scroll. Note: When you use a trackball to scroll, it remains idle until it is stopped.
Constant Value: 0 (0x00000000) public static final int scroll_state_touch_scroll added to API Level 1
The user scrolls through the touch and the finger does not exit the screen.
Constant Value: 1 (0x00000001) Public Method Public abstract void onscroll (abslistview view, int firstvisibleitem, int visibleitemcount, int totalitemcount) added to API Level 1
The callback function that is called when the list or grid scrolling is completed. It will be called after the scrolling is complete.
Parameters
View the object view of the rolling status report. |
The index of the first visible cell of firstvisibleitem (this parameter is ignored if visibleitemcount = 0 ). |
Visibleitemcount: number of visible cells. |
The number of entries in the totalitemcount list adapter. |
Public abstract void onscrollstatechanged (abslistview view, int scrollstate) added to API Level 1
When the list view or grid view is rolling, the callback function is executed. If the view is rolling, this method is called before rendering the next frame. That is, it will call anygetView(int, View, ViewGroup)
Method.
Parameters
View the object view of the rolling status report. |
Scrollstate: The current rolling status. The value isSCROLL_STATE_IDLE ,SCROLL_STATE_TOUCH_SCROLL OrSCROLL_STATE_IDLE . |