mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Delete LayoutDirectionUtil from fbsource
Summary: LayoutDirectionUtil is part of legacy architecutre, in this diff I'm deleting it from fbsource changelog: [internal] internal Reviewed By: shwanton, cortinico Differential Revision: D83984648 fbshipit-source-id: 161e4347ccab160fb1be66cba05f9474c0ad3b72
This commit is contained in:
committed by
meta-codesync[bot]
parent
e4da3437d9
commit
e5e8e637db
-36
@@ -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
|
||||
}
|
||||
}
|
||||
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user