johannilsson / android-pulltorefresh

DEPRECATED This project aims to provide a reusable pull to refresh widget for Android.
2.47k stars 1.03k forks source link

How to show pull-to-refresh automatically? #89

Open vinceyuan opened 10 years ago

vinceyuan commented 10 years ago

I have a list. The pull-to-refresh works well. Thanks! When the local data is old, the app should load data from the server automatically on activity start. So I want to show the pull-to-refresh animation automatically on activity start. I tried listView.scrollBy(x, y) which only scrolls the list view but does not trigger pull-to-refresh animation. Is there any solution? Thanks

foxty commented 10 years ago

Maybe you can use mListView.onRefresh() to auto load when activity start up.

ru-alxr commented 9 years ago

@vinceyuan Have you got solution?

johannilsson commented 9 years ago

Hi, I would suggest to migrate over to the SwipeRefreshLayout that's available in the support library for doing pull to refresh.