johannilsson/android-pulltorefresh

How to show pull-to-refresh automatically?

vinceyuan opened this issue · 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

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

@vinceyuan Have you got solution?

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