简体   繁体   中英

How to get informed about scrolling over the top of a ScrollView

Can somebody help me? I have an activity with a ViewPager in it. The Pages (Fragments) uses vertical ScrollView s. How can i realize, that a user who wants to update its contents can do it like in other apps eg Facebook? I mean, if the user is on the top of a ScrollView and he try to scroll up again, then there should open a loading-animation on the top of the ScrollView and a function loads data from a web sever....

So how i can get notified about the scroll up gesture of the user ?

I know that i will need a "invisible" view above the scrollView wich became visible when the user scroll "over the top" of the scrollView . The Animation and the dataexchange with the web server still aren't a problem - i will do it in an async task. My only question: where i have to listen on, to get informed about the scroll gesture over the top of the ScrollView ?

Thanks, Greets

PS: Sorry for my english - i am not a native english speaker.

使用OnScrollViewListener她是如何使用它的示例

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM