From 2f6cb8ba089d72d954b20e3f3e1a3b414eb3d612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateo=20Guzm=C3=A1n?= Date: Wed, 29 Jan 2025 07:09:04 -0800 Subject: [PATCH] Migrate com.facebook.react.uimanager.layoutanimation interfaces to Kotlin (#49026) Summary: Migrate com.facebook.react.uimanager.layoutanimation interfaces to Kotlin ## Changelog: [INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation interfaces to Kotlin Pull Request resolved: https://github.com/facebook/react-native/pull/49026 Test Plan: ```bash yarn test-android yarn android ``` Reviewed By: NickGerleman Differential Revision: D68794415 Pulled By: Abbondanzo fbshipit-source-id: 690d69e8360fb51eb0232b2ed2b4676e0d1a9ee6 --- ...outAnimationListener.java => LayoutAnimationListener.kt} | 6 +++--- ...outHandlingAnimation.java => LayoutHandlingAnimation.kt} | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/{LayoutAnimationListener.java => LayoutAnimationListener.kt} (66%) rename packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/{LayoutHandlingAnimation.java => LayoutHandlingAnimation.kt} (82%) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.kt similarity index 66% rename from packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.java rename to packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.kt index 0f392cc267c..93912ec4c0e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener.kt @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -package com.facebook.react.uimanager.layoutanimation; +package com.facebook.react.uimanager.layoutanimation /** Listener invoked when a layout animation has completed. */ -public interface LayoutAnimationListener { - void onAnimationEnd(); +public fun interface LayoutAnimationListener { + public fun onAnimationEnd() } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt similarity index 82% rename from packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.java rename to packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt index fe128d19c1b..40aca72cd94 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutHandlingAnimation.kt @@ -5,10 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -package com.facebook.react.uimanager.layoutanimation; +package com.facebook.react.uimanager.layoutanimation /** Interface for an animation type that takes care of updating the view layout. */ -/* package */ interface LayoutHandlingAnimation { +internal interface LayoutHandlingAnimation { /** * Notifies the animation of a layout update in case one occurs during the animation. This avoids * animating the view to the old layout since it's no longer correct; instead the animation should @@ -19,5 +19,5 @@ package com.facebook.react.uimanager.layoutanimation; * @param width the new width value for the view * @param height the new height value for the view */ - void onLayoutUpdate(int x, int y, int width, int height); + fun onLayoutUpdate(x: Int, y: Int, width: Int, height: Int) }