[Android] ListView listens for sliding up and down (determines whether to display the return button on the top), android returns to the top

Source: Internet
Author: User

[Android] ListView listens for sliding up and down (determines whether to display the return button on the top), android returns to the top

Set the scroll listener to determine the scrolling direction of the ListView and get the screen height and the actual ListView height, and determine whether to display the return button on the top (for details about the logic, see the code -- with a detailed comment ).

:Http://www.dwz.cn/zG99W

Source code running dynamic diagram


Other brilliant articles

Android KSOAP2 call. net webservicejQuery tutorial (8)-DOM tree operation using reverse Insertion Method android learning notes (34) using AlertDialog to create a simple dialog box android learning notes (33) Gallery view (Gallery) android navidgation drawer in the navigation drawer how to change the List of selected items...

Related Article

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.