Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 44844 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Description: The RaiseChild() and LowerChild() methods on the Layout class do not correctly change the visual order of any native controls (either custom renderer or hosted native control) contained within the supplied view on Android.
Expected Behavior: Visual order of native controls should change as a result of these methods calls just as the built in Xamarin.Forms controls do.
Customer has indicated that this behavior is present on versions of Xamarin.Forms ranging from 220.127.116.1147 through 18.104.22.168 and on Android 4.4.2, 5.0, and 5.1. Newer versions of Xamarin.Forms and Android have not been tested.
Customer has created a sample repository demonstrating the behavior on GitHub:
I don't think the video was provided in that project? I'm getting can't play error.
Notes from a call with Jason:
In Android, there are two widget orderings: drawing order & layout order.
When Xamarin.Forms rearranges widgets with LowerChild() or RaiseChild(), rather than pulling elements from hierarchy/putting in new location, which triggers relayout/other expensive operations, it just updates the z-index and triggers a redraw.
This doesn't work with hardware accelerated controls such as a video player.
For controls like this, you actually have to remove/re-add the child in order to change the layout order.
Layout order is order that views are added to the screen; Ex. getChildAt(0) gets the first child in layout order.
Add/remove child is the only way to change the layout order.