diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutDirectionUtil.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutDirectionUtil.kt deleted file mode 100644 index 0f8c0ff3861..00000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutDirectionUtil.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package com.facebook.react.uimanager - -import android.view.View -import com.facebook.react.common.annotations.internal.LegacyArchitecture -import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel -import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger -import com.facebook.yoga.YogaDirection - -@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR) -@Deprecated( - message = "This class is part of Legacy Architecture and will be removed in a future release", - level = DeprecationLevel.WARNING, -) -internal object LayoutDirectionUtil { - init { - LegacyArchitectureLogger.assertLegacyArchitecture( - "LayoutDirectionUtil", - LegacyArchitectureLogLevel.ERROR, - ) - } - - @JvmStatic - fun toAndroidFromYoga(direction: YogaDirection): Int = - when (direction) { - YogaDirection.LTR -> View.LAYOUT_DIRECTION_LTR - YogaDirection.RTL -> View.LAYOUT_DIRECTION_RTL - else -> View.LAYOUT_DIRECTION_INHERIT - } -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java index 2063e79fc67..8ff0580e36c 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java @@ -188,8 +188,6 @@ public class NativeViewHierarchyManager { try { View viewToUpdate = resolveView(tag); - viewToUpdate.setLayoutDirection(LayoutDirectionUtil.toAndroidFromYoga(layoutDirection)); - // Even though we have exact dimensions, we still call measure because some platform views // (e.g. // Switch) assume that method will always be called before onLayout and onDraw. They use it to