Ensure elevated views are not changing drawing order

Summary:
Uses `enableZ` trick to ensure that Skia doesn't try to reorder the views based on elevation. Unfortunately, it only helps for some cases, but the proper fix would require reimplementing `ViewGroup` completely to remove its internal logic of reordering based on Z coordinate.

Changelog: [Android][Fixed] Ensure elevated views are behind sticky header in FlatList

Reviewed By: cortinico

Differential Revision: D30700566

fbshipit-source-id: d2c59b22332922c610f4f2d415df34e81f5a33c5
This commit is contained in:
Andrei Shikov
2021-09-24 10:05:12 -07:00
committed by Facebook GitHub Bot
parent 4e8da9b28f
commit 4090195122
3 changed files with 112 additions and 0 deletions
@@ -95,4 +95,6 @@ public class ReactFeatureFlags {
public static boolean enableLockFreeEventDispatcher = false;
public static boolean enableAggressiveEventEmitterCleanup = false;
public static boolean insertZReorderBarriersOnViewGroupChildren = true;
}