Skip to content

Commit

Permalink
feat(android): migrate ReactSwitchManager to Kotlin (#48003)
Browse files Browse the repository at this point in the history
Summary:
This PR migrates `ReactSwitchManager` to Kotlin

Also it moves it's shadow node to a separate file (`ReactSwitchShadowNode.kt`)

## Changelog:

[ANDROID] [CHANGED] - Migrate `ReactSwitchManager` to Kotlin

Pull Request resolved: #48003

Test Plan: Make sure that `Switch` example in `RNTester` works correctly

Reviewed By: cortinico

Differential Revision: D66594606

Pulled By: javache

fbshipit-source-id: 774641c4cf57d6d5f770df1fed4fcafef2af7ceb
  • Loading branch information
krozniata authored and facebook-github-bot committed Dec 2, 2024
1 parent 91e217f commit b886bc4
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 271 deletions.
39 changes: 0 additions & 39 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -7137,45 +7137,6 @@ public final class com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout
public fun setRefreshing (Z)V
}

public class com/facebook/react/views/switchview/ReactSwitchManager : com/facebook/react/uimanager/SimpleViewManager, com/facebook/react/viewmanagers/AndroidSwitchManagerInterface {
public static final field REACT_CLASS Ljava/lang/String;
public fun <init> ()V
protected synthetic fun addEventEmitters (Lcom/facebook/react/uimanager/ThemedReactContext;Landroid/view/View;)V
protected fun addEventEmitters (Lcom/facebook/react/uimanager/ThemedReactContext;Lcom/facebook/react/views/switchview/ReactSwitch;)V
public fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/LayoutShadowNode;
public synthetic fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode;
protected synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
protected fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/facebook/react/views/switchview/ReactSwitch;
protected fun getDelegate ()Lcom/facebook/react/uimanager/ViewManagerDelegate;
public fun getName ()Ljava/lang/String;
public fun getShadowNodeClass ()Ljava/lang/Class;
public fun measure (Landroid/content/Context;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/ReadableMap;FLcom/facebook/yoga/YogaMeasureMode;FLcom/facebook/yoga/YogaMeasureMode;[F)J
public synthetic fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
public fun receiveCommand (Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
public synthetic fun setBackgroundColor (Landroid/view/View;I)V
public fun setBackgroundColor (Lcom/facebook/react/views/switchview/ReactSwitch;I)V
public synthetic fun setDisabled (Landroid/view/View;Z)V
public fun setDisabled (Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
public synthetic fun setEnabled (Landroid/view/View;Z)V
public fun setEnabled (Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
public synthetic fun setNativeValue (Landroid/view/View;Z)V
public fun setNativeValue (Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
public synthetic fun setOn (Landroid/view/View;Z)V
public fun setOn (Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
public synthetic fun setThumbColor (Landroid/view/View;Ljava/lang/Integer;)V
public fun setThumbColor (Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
public synthetic fun setThumbTintColor (Landroid/view/View;Ljava/lang/Integer;)V
public fun setThumbTintColor (Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
public synthetic fun setTrackColorForFalse (Landroid/view/View;Ljava/lang/Integer;)V
public fun setTrackColorForFalse (Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
public synthetic fun setTrackColorForTrue (Landroid/view/View;Ljava/lang/Integer;)V
public fun setTrackColorForTrue (Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
public synthetic fun setTrackTintColor (Landroid/view/View;Ljava/lang/Integer;)V
public fun setTrackTintColor (Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/Integer;)V
public synthetic fun setValue (Landroid/view/View;Z)V
public fun setValue (Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
}

public final class com/facebook/react/views/text/DefaultStyleValuesUtil {
public static final field INSTANCE Lcom/facebook/react/views/text/DefaultStyleValuesUtil;
public static final fun getDefaultTextColor (Landroid/content/Context;)Landroid/content/res/ColorStateList;
Expand Down

This file was deleted.

Loading

0 comments on commit b886bc4

Please sign in to comment.