Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to disable and enable SSPullToRefresh #20

Closed
vahan16 opened this issue Dec 27, 2022 · 3 comments
Closed

Add feature to disable and enable SSPullToRefresh #20

vahan16 opened this issue Dec 27, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@vahan16
Copy link

vahan16 commented Dec 27, 2022

In some cases I need to disable pull to refresh, and the library does not allow me to do that.
It would be good to have that feature to disable SSPullToRefresh.

@vahan16 vahan16 added the enhancement New feature or request label Dec 27, 2022
@nishchal-v
Copy link
Collaborator

@vahan16 Thanks for trying out our Library!

Based on your needs, I suppose you can toggle the View.isEnabled on your SSPullToRefresh to disable/enable it.
Let us know if you have any other specific requirements that we can help with.

@vahan16
Copy link
Author

vahan16 commented Jan 25, 2023

Hi again @nishchal-v
I have already tried with isEnabled and that's not working,

I just cloned your repository and tried to fix that,
and the issue can be fixed with returning false in onInterceptTouchEvent method

If you can add this improvement, it will be appreciated.

Screen Shot 2023-01-25 at 12 11 20

@nishchal-v
Copy link
Collaborator

@vahan16 isEnabled Should work and it works while testing on the demo I have embedded in this repo, no need to provide an extra boolean flag in the SSPullToRefresh class that essentially does the same.

I would like to know how you disable the SSPullToRefresh and why it is not working for you.
The View.isEnabled is primitive functionality and should work on custom views without any issues.

Can you please share more info on how you disable the view, on which android version you are testing and what the target API levels are?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants