Skip to content

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

Closed
h-unterp wants to merge 1 commit into
johannilsson:masterfrom
h-unterp:patch-1
Closed

This makes the pointless tap-to-refresh button go away after refresh.#24
h-unterp wants to merge 1 commit into
johannilsson:masterfrom
h-unterp:patch-1

Conversation

@h-unterp
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown
Author

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
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown

frenkel commented Aug 31, 2011

smoothScrollBy only works on 2.2 and up...

@h-unterp
Copy link
Copy Markdown
Author

an alternative: smoothScrollToPosition is api level 8

@frenkel
Copy link
Copy Markdown

frenkel commented Aug 31, 2011

Api level 8 = Android 2.2

@johannilsson
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown
Author

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
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown

frenkel commented Aug 31, 2011

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

@johannilsson
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown

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

@h-unterp
Copy link
Copy Markdown
Author

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

@johannilsson
Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown
Owner

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

@SugerGirl
Copy link
Copy Markdown

SugerGirl commented Jun 27, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants