mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Correctly apply elevation barriers to Android views
Summary: The elevation barriers that limited view reordering were applied incorrectly, disabling elevation completely for some combinations of views. This change ensures the order of barriers is correct and only disables elevation reorder between the children and not on them. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D31541961 fbshipit-source-id: 2fa4dc6906790053bd4445c841aeda0e2b3830e5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
232d02c5f6
commit
e9440508e1
@@ -766,13 +766,13 @@ public class ReactViewGroup extends ViewGroup
|
||||
child.getElevation() > 0 && ReactFeatureFlags.insertZReorderBarriersOnViewGroupChildren;
|
||||
|
||||
if (drawWithZ) {
|
||||
CanvasUtil.enableZ(canvas, false);
|
||||
CanvasUtil.enableZ(canvas, true);
|
||||
}
|
||||
|
||||
boolean result = super.drawChild(canvas, child, drawingTime);
|
||||
|
||||
if (drawWithZ) {
|
||||
CanvasUtil.enableZ(canvas, true);
|
||||
CanvasUtil.enableZ(canvas, false);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user