Abslistview. onscrolllistener

Source: Internet
Author: User
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_SCROLLOrSCROLL_STATE_IDLE.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.