johannilsson / android-pulltorefresh

DEPRECATED This project aims to provide a reusable pull to refresh widget for Android.
2.47k stars 1.03k forks source link

This makes the pointless tap-to-refresh button go away after refresh. #24

Closed h-unterp closed 2 years ago

h-unterp commented 13 years ago

This library is one of the best pull-to-refresh libraries, it is not perfect, but it is close. Lets develop it to perfection. It is not as fast as the Twitter client for Android, how can we speed it up, any ideas?? Please take this commit, I don't see any point in the tap-to-refresh button.

johannilsson commented 13 years ago

Thank you. What we need to do is to implement the pull functionality when there's no or just a few items in the list. This is why we need the tap functionality today. This is doable but requires a little more work.

h-unterp commented 13 years ago

Ah, then maybe I can adjust my patch for the small list size case. I really like my change because it completely gets rid of the tap-to-refresh button in the normal list size case.

johannilsson commented 13 years ago

Don't get me wrong I would also like to get rid of the tap to refresh but by removing it this way it removes the functionality to refresh the list completely. There's another pull request that attempts to fix this problem. Maybe you can try that branch and see how that works for you? I would also like to do some experiments by adding extra space at the bottom to fill up the whole screen to trick the regular pull to refresh to kick in.

frenkel commented 13 years ago

smoothScrollBy only works on 2.2 and up...

h-unterp commented 13 years ago

an alternative: smoothScrollToPosition is api level 8

frenkel commented 13 years ago

Api level 8 = Android 2.2

johannilsson commented 13 years ago

There used to be a scrollListBy that used smoothScrollBy if available but has been removed since I think setSelection works just as good which is also called within the method resetHeader so the tap to refresh mode should go away if there's enough items in the list. But there's more work to it if we want to completely remove this mode.

h-unterp commented 13 years ago

http://developer.android.com/resources/dashboard/platform-versions.html Less than 20% of Android is below 2.2

The 80/20 rule dictates this will be fine.

johannilsson commented 13 years ago

That's true we can probably target api level 8 or greater soon, but I don't see how smoothScroll* is better to use here than setSelection does it behave differently except from the smooth part?

frenkel commented 13 years ago

My customers want their apps to work on 2.1+, so I won't be using this if you target level 8.

johannilsson commented 13 years ago

It's still to early to target 2.2. Here in Sweden my statistics for my apps tells me that it still quite a lot that is below this level (more than googles stats tells) so I don't want to drop it either.

jonasbark commented 13 years ago

Any news here? It's the only thing that keeps me from using it.

h-unterp commented 13 years ago

Not as far as I can tel, see the twitter app.

johannilsson commented 13 years ago

No news yet. I guess what we can do is to give an option to disable the "tap to refresh" for now. Then we can implement this properly later on. So what I would like to see is an attribute added to layout and a method on the PullToFreshListView which can disable "tap to refresh", I don't want it to be completely removed.

johannilsson commented 13 years ago

There's a new pull request for this in #40. Please comment on how it works and test it if you like.

SugerGirl commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。