android-pulltorefresh icon indicating copy to clipboard operation
android-pulltorefresh copied to clipboard

How to show pull-to-refresh automatically?

Open vinceyuan opened this issue 10 years ago • 3 comments

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

vinceyuan avatar May 05 '14 08:05 vinceyuan

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

foxty avatar Jul 09 '14 02:07 foxty

@vinceyuan Have you got solution?

ru-alxr avatar Dec 02 '14 10:12 ru-alxr

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

johannilsson avatar Dec 02 '14 17:12 johannilsson