Migrate ReactOverflowView to kotlin (#47750)

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

Migrate ReactOverflowView to kotlin

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D66217252

fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
This commit is contained in:
David Vacca
2024-12-16 18:39:12 -08:00
committed by Facebook GitHub Bot
parent 03a1246c35
commit 25ee3e805d
3 changed files with 22 additions and 26 deletions
@@ -1,25 +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 androidx.annotation.Nullable;
/**
* Interface that should be implemented by {@link View} subclasses that support {@code overflow}
* style. This allows the overflow information to be used by {@link TouchTargetHelper} to determine
* if a View is touchable.
*/
public interface ReactOverflowView {
/**
* Gets the overflow state of a view. If set, this should be one of {@link ViewProps#HIDDEN},
* {@link ViewProps#VISIBLE} or {@link ViewProps#SCROLL}.
*/
@Nullable
String getOverflow();
}
@@ -0,0 +1,21 @@
/*
* 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
/**
* Interface that should be implemented by [View] subclasses that support [overflow] style. This
* allows the overflow information to be used by [TouchTargetHelper] to determine if a View is
* touchable.
*/
public interface ReactOverflowView {
/**
* Gets the overflow state of a view. If set, this should be one of [ViewProps#HIDDEN],
* [ViewProps#VISIBLE] or [ViewProps#SCROLL].
*/
public fun getOverflow(): String?
}
@@ -303,7 +303,7 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
@ReactProp(name = ViewProps.OVERFLOW)
public open fun setOverflow(view: ReactViewGroup, overflow: String?) {
view.overflow = overflow
view.setOverflow(overflow)
}
@ReactProp(name = "backfaceVisibility")