Question

I want to add pull to refresh function for a listview, but in the listview header, there is a view pager, the view pager scroll horizontal and I don't want to the listview header responding the pull to refresh event, because the header is part of the listview, so I couldn't use the function theseChildrenArePullable(), any solution provided?

Was it helpful?

Solution 2

okay, according to my requirement, I fork the PTR project and add the function at https://github.com/yingchn/ActionBar-PullToRefresh.

and I have create a pull request to merge the original project refer to https://github.com/chrisbanes/ActionBar-PullToRefresh/pull/283

hope it is useful for you

OTHER TIPS

If you are using PTR from Chris Banes :

https://github.com/chrisbanes/ActionBar-PullToRefresh

You can set pullable childs :

ActionBarPullToRefresh.from(getActivity())
       // Here you can mark what views are pullable
       .theseChildrenArePullable(android.R.id.list, android.R.id.empty)
       .listener(this) //Activity implements on refresh listener
       .setup(mPullToRefreshLayout);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top