owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.81k stars 3.05k forks source link

Improved pull to refresh #693

Closed jancborchardt closed 5 years ago

jancborchardt commented 9 years ago

Currently pull to refresh is very janky. There’s native pull to refresh since some time and we should use that.

@davivel @rperezb @tobiasKaminsky

tobiasKaminsky commented 9 years ago

As far as I see SwipeRefreshLayout is used. And this is also still suggested in https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html If you know that there is something newer/better, please let us know.

jancborchardt commented 9 years ago

For GH::watch (a Github notifications app) @velias implemented that and it looks quite different from our Android app: https://github.com/Daskiworks/ghwatch/issues/45#issuecomment-60511010

tobiasKaminsky commented 9 years ago

I do not see a significant difference.
I have looked at his PR (https://github.com/Daskiworks/ghwatch/commit/809618a38b1cb6d900d14d87e7f03b2b54634678) and he is also mentioning the same Website (https://github.com/Daskiworks/ghwatch/issues/45#issuecomment-60511010). As it seems that you know both apps: Is there a difference in the UX? If so, please describe it or give a screenshot.

jancborchardt commented 9 years ago

There is a difference in that it feels much smoother in the GH::watch app. Seems like it might be the new material design way to do it. Best download it and see for yourself. :)

tobiasKaminsky commented 9 years ago

I see no big difference when using it (regarding smooth). Maybe the reason for your feeling is that in GH::watch the ListView remains on place and only an overlay shows the reloading whereas in owncloud the complete ListView is swiped down and up and additionally you see the spinning circle in the menu. But the code is the same. So I think it is just related to the material design as you already said.

LukeOwlclaw commented 9 years ago

I agree with Jan: Refresh by swiping down feels a little clumsy. Can't tell for sure why. Maybe it just pulls up again too fast. I am using mail client K9, it feels much smoother. I also adds a temporary entry in the list showing that download is in progress. Pretty nice, I think. swipetorefresh

tobiasKaminsky commented 9 years ago

The difference between owncloud and k9 is that k9 starts to sync when you release your swipe down gesture, whereas owncloud does this on their own ;) which is unexpected. And yes. The more and more I use other apps using that gesture I feel that ownclouds way is not very good... So a good starting point would be to do it the way k9 does it?

davivel commented 9 years ago

As @tobiasKaminsky said currenlty we are using the native component for pull-down. To change its responsiveness, the parameters and methods of that component may be reviewed. But the description of what we need should be a bit more precise than "is very janky" ;)

One thing now explicitly done is hiding the native "in progress" indicator, that could be used instead of the current progress circle. Check, for instance, Gmail to see the native one (colours are customizable).

jancborchardt commented 9 years ago

@davivel yeah, sorry it’s such an imprecise description. But it’s probably best if you try out other apps like Mail, K9, etc.