简体   繁体   English

如何检测滚动条何时到达网页的顶部或底部?

[英]How to detect when the scrollbar has reached the top or bottom of webpage?

I am working with WebView and my problem is that whenever the scrollbar reaches to the end or top of WebView it should indicate this to me with some boolean value so that I can display the next and previous page correspondingly. 我正在使用WebView ,但我的问题是,每当滚动条到达WebView的末尾或顶部时,都应使用一些布尔值向我表明这一点,以便我可以相应地显示下一页和上一页。

I am working on a project and I want to show a HTML file as a html reader so I want to know whenever the scrollbar reaches the end of webpage so I can load the further pages. 我正在做一个项目,我想将HTML文件显示为html阅读器,所以我想知道滚动条何时到达网页的末尾,以便我可以加载其他页面。

I do recommend you iScroll: 我建议您使用iScroll:

http://cubiq.org/iscroll-4

It's easy to use and it works fairly perfect on every mobile platforms. 它易于使用,并且在每个移动平台上都可以完美运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 检测ListView何时到达底部 - onScroll()或onScrollStateChanged()? - Detect when ListView has reached the bottom - onScroll() or onScrollStateChanged()? 如何检测滚动视图何时到达底部,以便可以向其中加载更多项目? - How can I detect when a scrollview has reached the bottom so that I can load more items into it? 检测何时recyclerview到达最高位置 - Detect when the recyclerview has reached the top most position 如何检测我的文档已到达移动设备的页面底部? - How to detect my document has reached the page bottom on mobile devices? 如何知道listview滚动是否到达底部/顶部 - how to know if listview scroll has reached the bottom/Top 当列表视图已到达顶部时,如何检测用户是否在向上滚动 - How can I detect if the user is scrolling up when the listview has already reached the top 检测scrollview是否到达底部钛 - detect if scrollview has reached the bottom titanium Android - 我怎么知道gridview何时到达底部? - Android - how can i know when gridview has reached the bottom? VertScrollBox检测何时到达Android和IOS - VertScrollBox Detect when bottom reached android and IOS 如何检测scrollview的孩子到达屏幕顶部? - how to detect child of scrollview reached top of screen?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM