We are building multi-platform mobile app using Cordova, html, css. For some of our screen, we need pull to refresh functionality. I tried Damien's solution (http://damien.antipa.at/2012/10/16/ios-pull-to-refresh-in-mobile-safari-with-native-scrolling/) and iScroll for iOS and it works great for iOS platforms. But none of the methods works for android platform. Can someone please help me with this? How can i build pull To Refresh for Android platform.
You should be able to do that with iscroll.js : http://iscrolljs.com/
Or you can read Christophe Coenraets's blog article.
I enjoy the simplicity of this if you're also using React.js
https://www.npmjs.com/package/react-pull-to-refresh
An example :
<ReactPullToRefresh
onRefresh={this.handleRefresh}
className="your-own-class-if-you-want"
style={{
textAlign: 'center'
}}>
<h3>Pull down to refresh</h3>
<div>{items}</div>
<div>etc.</div>
</ReactPullToRefresh>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With