-
Notifications
You must be signed in to change notification settings - Fork 42
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
Not able to use inside NestedScrollView #12
Comments
when used inside a nested scroll view, the scratching process does not work smoothly. |
Just to update, this is not working in scroll view also. |
Hi there, I'm sorry to hear you're having trouble, but without more information there's not much that can be done to help. Do you have a minimum working example to demonstrate the issues you're experiencing? It's also worth noting that the system was never intended to run in any kind of scrollable content area. The way we simulate scratchable regions using the View's drawing caches would almost certainly not behave correctly inside a container that's also trying to manage the drawing. |
Hi, Can you help in any way or suggest something? |
In order for us to "scratch," we need the touch events passed to the If you wanted to implement this inside of a scrolling container, you would have to handle all touch events and then manually delegate them to the correct systems (ScratchoffController / NestedScrollView) based on the gesture. This would also require a partial re-write of Is there a reason this has to be within a scrolling container, though? Can you post a minimum code sample of what you're trying to accomplish? Maybe I can recommend an alternative approach. |
Sorry, i cannot put the code here. |
Hi controller.getScratchImageLayout().setOnTouchListener(new View.OnTouchListener() { This is working perfectly fine for me. Please suggest if you find some fishy in this :) |
That looks like it would work well; disabling the scrolling when an ACTION_DOWN occurs on the ScratchImageLayout. In fact, it might even be worth adding something similar to the library in the future, or at least exposing the touch events to allow this to work directly with the ScratchoffController. |
Hi Matt, Thanks for acknowledging the solution shared by me. I hope you add this to your library to make it more customizable :) |
Having same issue. And your solution does not work for me. |
Trying to use this within a NestedScrollView? This isn't intended use of the system, but there is a potential fix using shubii's idea that may allow additional touch observations. I'm still in the process of testing it, but you can try pulling in that branch locally if you'd like in the meantime.
I'm sorry, but could you rephrase that or provide a screenshot? I'm not understanding the behavior you're referring to. |
Attached Screenshot. When i touch to top side of view it automatically scratch down. |
No description provided.
The text was updated successfully, but these errors were encountered: