From a2523a24c7768207f798032ff640d74a2e5b00ce Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 20 Nov 2024 23:08:03 -0800 Subject: [PATCH] Migrate ReactCompoundView to kotlin (#47748) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47748 Migrate ReactCompoundView to kotlin changelog: [internal] internal Reviewed By: javache Differential Revision: D66217094 fbshipit-source-id: 238c20c907880f4251c9b5926ad486cfff55a3b0 --- .../{ReactCompoundView.java => ReactCompoundView.kt} | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) rename packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/{ReactCompoundView.java => ReactCompoundView.kt} (74%) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactCompoundView.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactCompoundView.kt similarity index 74% rename from packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactCompoundView.java rename to packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactCompoundView.kt index dd1d7a9a2cc..3c0975f3fd2 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactCompoundView.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactCompoundView.kt @@ -5,13 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -package com.facebook.react.uimanager; - -import android.view.View; +package com.facebook.react.uimanager /** * This interface should be implemented be native {@link View} subclasses that can represent more - * than a single react node (e.g. TextView). It is use by touch event emitter for determining the + * than a single react node (e.g. [TextView]). It is use by touch event emitter for determining the * react tag of the inner-view element that was touched. */ public interface ReactCompoundView { @@ -22,5 +20,5 @@ public interface ReactCompoundView { * @param touchX the X touch coordinate relative to the view * @param touchY the Y touch coordinate relative to the view */ - int reactTagForTouch(float touchX, float touchY); + public fun reactTagForTouch(touchX: Float, touchY: Float): Int }