Reputation: 1515
Is it possible to implemented a Pull to Refresh feature to reload pages within a WebView (Version 2.2 and above)?
Upvotes: 9
Views: 15122
Reputation: 4935
This is now super easy by using the SwipeRefreshLayout. A good tutorial is available here: http://antonioleiva.com/swiperefreshlayout/
Upvotes: 2
Reputation: 81539
You can override overScrollBy()
method and obtain deltaY
at a given scrollY
value, then call your inner javascript
method responsible for starting pull to refresh.
Android ListView: get Overscroll distance
Upvotes: 0
Reputation: 1888
Download Zip from the following link.Add the library project(library) to both PullToRefreshListFragment & PullToRefreshViewPager as library project after that add PullToRefreshListFragment &PullToRefreshViewPager projects to LauncherActivity to run.
https://github.com/chrisbanes/Android-PullToRefresh
To use webView PullTorefresh in your project Activity, Your Project-> properties->android->add the library.jar
Upvotes: 0
Reputation: 11878
You can use Android-PullToRefresh library, it contains different ready-to-use wraps for GridView, ListView, ScrollView and WebView. Please take a look at: https://github.com/chrisbanes/Android-PullToRefresh/wiki/Quick-Start-Guide.
Upvotes: 0
Reputation: 2205
Have you tried https://github.com/chrisbanes/Android-PullToRefresh
According to the documentation it also has support for WebViews and the demo app works like a charm.
Upvotes: 10