Inside one main scrollview (parent) I have several panels placed vertically, each panel contains other scrollviews (children). The children contain page indicators (UIPageControl).
It's as in the picture.
The problem I am facing is that I need to get the children's event _ScrollChanged fired, because I need to indicate in UIPageControl the current page, but it's not getting fired. I suspect that there is an interception of _ScrollChanged between the children and the parent scrollview.
One way i would go about doing that is catch the _Touch event on the scrollview's panel and follow steps in order to figure out what the user is doing.
Step 1: catch if its an horizontal scroll (Action_Move if new X > old_x by 100dip (example))
Step 2: catch the relative scrollview by going through a loop:
B4X:
For each v as view in sv.panel.Getallviewsrecursive
if(v is scrollview)then
dim tempscroll as scrollview = v
if(tempscroll.top > y and (tempscroll.top+tempscroll.height)<y)then
'This is the scrollview targeted
'Act accordingly in relation to the Action Move direction
end if
end if
I do things like this and it works very well. It does depend on the number of views you have in the main scrollview. if there are a lot of views you will slow down the app for sure because of the loop.
I am unsure if thats what you are looking for. I am just trying to help
Thanks for the tips, colleagues! I have deeply analyzed the differences and found one clue: actually only the last child works (they're all added dynamically).