SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 92 C++

Remove setViewZIndex and associated state from BaseViewManager (#56717)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56717

This is a follow-up to D91121582 which deprecated ReactZIndexedViewGroup and removed custom draw order logic from ReactViewGroup. That diff kept `setZIndex()` in BaseViewManager and BaseViewManagerDelegate for backward compatibility, to be removed in a follow-up.

This diff completes that cleanup by removing:
- The `setZIndex` method from `BaseViewManager` (which called `ViewGroupManager.setViewZIndex` and triggered `updateDrawingOrder()` on the parent)
- The `Z_INDEX` case from `BaseViewManagerDelegate`
- The `zIndexHash` WeakHashMap, `setViewZIndex`, and `getViewZIndex` static methods from `ViewGroupManager`'s companion object
- The `ViewGroupDrawingOrderHelper` class, which was dead code (marked `LegacyArchitecture`, no longer imported anywhere) and depended on the removed `getViewZIndex`

Z-index is now fully managed at the C++ Fabric layer, and these Android-side mechanisms are no longer needed.

Changelog: [Android][Removed] Removed `ViewGroupManager.setViewZIndex`/`getViewZIndex` and `ViewGroupDrawingOrderHelper` — z-index is now fully managed by the Fabric C++ layer

Reviewed By: sammy-SC

Differential Revision: D104101783

fbshipit-source-id: 7c69afc307cef9ebe3a939cf559050372f093c97
P
Pieter De Baets committed
c49aa90a86f689d2aefaa3122a416767357e4d80
Parent: 91702e5
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 5/7/2026, 1:24:20 PM