Skip to content

Commit

Permalink
Kotlinify react/animated interfaces (#45725)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #45725

# Changelog:
[Internal] -

The "interface" classes inside `animated` converted to Kotlin.

Reviewed By: tdn120

Differential Revision: D60284765

fbshipit-source-id: fe7bbecad706e3f58db8304a6bad23d05f999118
  • Loading branch information
rshest authored and facebook-github-bot committed Jul 29, 2024
1 parent 1e6b979 commit e2de11c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
8 changes: 8 additions & 0 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,14 @@ public abstract class com/facebook/react/animated/AnimatedNode {
public final class com/facebook/react/animated/AnimatedNode$Companion {
}

public abstract interface class com/facebook/react/animated/AnimatedNodeValueListener {
public abstract fun onValueUpdate (D)V
}

public abstract interface class com/facebook/react/animated/AnimatedNodeWithUpdateableConfig {
public abstract fun onUpdateConfig (Lcom/facebook/react/bridge/ReadableMap;)V
}

public class com/facebook/react/animated/NativeAnimatedModule : com/facebook/fbreact/specs/NativeAnimatedModuleSpec, com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/bridge/UIManagerListener {
public static final field ANIMATED_MODULE_DEBUG Z
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.animated;
package com.facebook.react.animated

/** Interface used to listen to {@link ValueAnimatedNode} updates. */
interface AnimatedNodeValueListener {
void onValueUpdate(double value);
/** Interface used to listen to [ValueAnimatedNode] updates. */
public fun interface AnimatedNodeValueListener {
public fun onValueUpdate(value: Double)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.animated;
package com.facebook.react.animated

import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMap

/** Indicates that AnimatedNode is able to receive native config updates. */
interface AnimatedNodeWithUpdateableConfig {
void onUpdateConfig(ReadableMap config);
public fun interface AnimatedNodeWithUpdateableConfig {
public fun onUpdateConfig(config: ReadableMap?)
}

0 comments on commit e2de11c

Please sign in to comment.