-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Kautomator] auto-scrolling not working properly in screens with several Scrollables #342
Comments
Hi @sergio-sastre! |
Sure, I'll try that :) |
I've been evaluating how to better solve this. scrollSafely(UiSelector().withId("scroll_View")){
// action on targetView
} Second scrollView.scrollToView(targetView)
// action on targetView Looks like the first one has no real advantage over the second one, since you still need to identify the view that needs to do the scroll. That was the main advantage of AutoScroll: you do not need to know anything about the scrolling containers. Suggestion However, I've realised that horizontal scrollable Views do not scroll properly when using Kautomator. I'll open a PR shortly that adds a |
@sergio-sastre Hi Sergio! |
Here is the PR: I believe, if that solution is fine, we should add some remark in the docu to make Kautomator users aware of the possible misbehaviour if the screen contains several scrolling views (e.g. scrollable layouts, CollapsingToolbarLayout, HorizontalScrollableView and NestedScrollView etc.) and how to solve it :) |
@sergio-sastre Hi! |
@matzuk You can assign this to me. I've worked on this already, but closed the PR because I made it dependent to another one that had nothing to do with this. I'll continue working on this on the 22nd August week, if I do not find time before |
@sergio-sastre Hi! |
So here my insights on this when dealing with nested ScrollableViews:
It seems a bit complex, but I can try to go with it. However it will take some time... |
Hi, @sergio-sastre! Could you tell if you're working on this, please? |
I'm planning to work on the first point this week, which would be easy. |
This happens for example in screens containing several Scrollable views like one "CollapsingToolbarLayout" and a "ScrollView/NestedScrollView/RecyclerView..."
e.g. the layout I was using to fix ScrollView with padding:
Layout with CollapsingToolbarLayout, HorizontalScrollableView and NestedScrollView
Removing the CollapsingToolbarLayout fixes the issue indeed.
That happens because ObjectAutoScrollProvider uses
That scrolls the first scrollable View, in this cases the CollapsingToolbarLayout!
Possible solution:
Enable through Kaspresso builder to pass a UiSelector() for the View we want to autoscroll
e.g.
This would give the developer the flexibility for such cases.
Any other suggestion to a better solution is welcome :)
NOTE:
I tested a draft of the proposed solution and it works. I can take this also for 1.4.1 :)
Solution checklist:
The text was updated successfully, but these errors were encountered: