Yalantis / Phoenix

Phoenix Pull-to-Refresh
https://yalantis.com/
Apache License 2.0
4.02k stars 920 forks source link

Pull to refresh padding ( for use with toolbar ) #8

Closed DavidPacioianu closed 9 years ago

DavidPacioianu commented 9 years ago

There is no way to setProgressViewOffset(boolean scale, int start, int end) like for SwipeRefreshLayout.

shliama commented 9 years ago

Why don't you just align the listview below the toolbar?

DavidPacioianu commented 9 years ago

I can't do that because the toolbar is in the main layout and the recyclerView is used from a fragment. I use a padding for the recyclerView because I am hiding/showing it on scroll.

shliama commented 9 years ago

well, thanks to above merge request, I've come back here... updated @DavidPacioianu method to be able to tweak all paddings and removed null-check, because in that place view cannot be null (it's initiated in the constructor). You can use it like that:

mPullToRefreshView.setRefreshViewPadding(0, 100, 0, 0);

in this case, refresh view (the one with sun, sky etc.) will be offset by 100 pixels from top. This is already available from maven repo, version 1.2.2