I have a problem changing the Z-order of views inside a scrollView.
I hope I'll explain my use case correctly.
the use case is the following:
I have scrollView SV that has a linear layout LL.
inside the LL I add several views. The views are RelativeLayouts RL with 2 imageviews (IMG1 and IMG2)inside. IMG1 is visible IMG2 is gone.
When I trigger a certain action, I animate the imageView IMG2 that was gone so it slides to the right. It slides being at the back of IMG1 and only showing the part where it exceeds IMG1's width. This is ok and is what I want.
I have everything working except one thing: I want IMG2 to be at the back of IMG1 (as it is right now) but at the front of all other RL's inside the Scroll View.
I think my problem can be put down to the following: How can I change the Z-Order of the views inside a scroll view? because if I can z-order the RL's inside the scrollView (bringing to front or sending to back as I want) this use case will work.
From my tests I see that the z-order of the views is the same of the order i add the views to the scrollview, but this ruins my case as i need to bring to front or send to back the views as I want.
I tried every method of bringToFront and bringChildToFront and nothing works.
is there a way of doing this?