You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert ReactScrollView and ReactNestedScrollView to Kotlin
Summary:
Convert `ReactScrollView.java` to `ReactScrollView.kt` and update the `generate-nested-scroll-view.js` script to generate `ReactNestedScrollView.kt` from the Kotlin source.
Key changes:
- `ReactScrollView.java` replaced by idiomatic `ReactScrollView.kt`
- `ReactNestedScrollView.java` replaced by generated `ReactNestedScrollView.kt`
- Generation script updated for Kotlin source/output file paths and transformations
- BUCK file updated to reference `.kt` files in the verification genrule
- `ReactScrollViewManager.kt` updated to use Kotlin property access syntax for `scrollEnabled`, `stateWrapper`, and `fadingEdgeLengthStart/End`
- Public API surface preserved: only additive `synthetic` constructor from `JvmOverloads`
Changelog:
[Android][Changed] - Convert `ReactScrollView` and `ReactNestedScrollView` from Java to Kotlin
Differential Revision: D107236882
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/api/ReactAndroid.api
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5598,6 +5598,7 @@ public final class com/facebook/react/views/scroll/ReactHorizontalScrollViewMana
5598
5598
public class com/facebook/react/views/scroll/ReactScrollView : android/widget/ScrollView, android/view/View$OnLayoutChangeListener, android/view/ViewGroup$OnHierarchyChangeListener, com/facebook/react/uimanager/ReactClippingViewGroup, com/facebook/react/uimanager/ReactOverflowViewWithInset, com/facebook/react/views/scroll/ReactAccessibleScrollView, com/facebook/react/views/scroll/ReactScrollViewHelper$HasFlingAnimator, com/facebook/react/views/scroll/ReactScrollViewHelper$HasScrollEventThrottle, com/facebook/react/views/scroll/ReactScrollViewHelper$HasScrollState, com/facebook/react/views/scroll/ReactScrollViewHelper$HasSmoothScroll, com/facebook/react/views/scroll/ReactScrollViewHelper$HasStateWrapper, com/facebook/react/views/scroll/VirtualViewContainer {
5599
5599
public fun <init> (Landroid/content/Context;)V
5600
5600
public fun <init> (Landroid/content/Context;Lcom/facebook/react/views/scroll/FpsListener;)V
5601
+
public synthetic fun <init> (Landroid/content/Context;Lcom/facebook/react/views/scroll/FpsListener;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
5601
5602
public fun abortAnimation ()V
5602
5603
public fun dispatchGenericMotionEvent (Landroid/view/MotionEvent;)Z
5603
5604
public fun draw (Landroid/graphics/Canvas;)V
@@ -5659,7 +5660,6 @@ public class com/facebook/react/views/scroll/ReactScrollView : android/widget/Sc
5659
5660
public fun setFadingEdgeLengthEnd (I)V
5660
5661
public fun setFadingEdgeLengthStart (I)V
5661
5662
public fun setLastScrollDispatchTime (J)V
5662
-
public fun setMaintainVisibleContentPosition (Lcom/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper$Config;)V
5663
5663
public fun setOverflow (Ljava/lang/String;)V
5664
5664
public fun setOverflowInset (IIII)V
5665
5665
public fun setPagingEnabled (Z)V
@@ -5925,6 +5925,28 @@ public abstract interface class com/facebook/react/views/scroll/VirtualView {
5925
5925
public abstract fun onModeChange (Lcom/facebook/react/views/virtual/VirtualViewMode;Landroid/graphics/Rect;)V
5926
5926
}
5927
5927
5928
+
public abstract class com/facebook/react/views/scroll/VirtualViewContainerState {
5929
+
public static final field Companion Lcom/facebook/react/views/scroll/VirtualViewContainerState$Companion;
5930
+
public fun <init> (Landroid/view/ViewGroup;)V
5931
+
public static final fun create (Landroid/view/ViewGroup;)Lcom/facebook/react/views/scroll/VirtualViewContainerState;
5932
+
protected final fun getEmptyRect ()Landroid/graphics/Rect;
5933
+
protected final fun getPrerenderRatio ()D
5934
+
protected final fun getPrerenderRect ()Landroid/graphics/Rect;
5935
+
protected final fun getScrollView ()Landroid/view/ViewGroup;
5936
+
protected abstract fun getVirtualViews ()Ljava/util/Collection;
5937
+
protected final fun getVisibleRect ()Landroid/graphics/Rect;
5938
+
public fun onChange (Lcom/facebook/react/views/scroll/VirtualView;)V
5939
+
public fun remove (Lcom/facebook/react/views/scroll/VirtualView;)V
5940
+
protected abstract fun updateModes (Lcom/facebook/react/views/scroll/VirtualView;)V
5941
+
public static synthetic fun updateModes$default (Lcom/facebook/react/views/scroll/VirtualViewContainerState;Lcom/facebook/react/views/scroll/VirtualView;ILjava/lang/Object;)V
5942
+
protected final fun updateRects ()V
5943
+
public final fun updateState ()V
5944
+
}
5945
+
5946
+
public final class com/facebook/react/views/scroll/VirtualViewContainerState$Companion {
5947
+
public final fun create (Landroid/view/ViewGroup;)Lcom/facebook/react/views/scroll/VirtualViewContainerState;
5948
+
}
5949
+
5928
5950
public class com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout : androidx/swiperefreshlayout/widget/SwipeRefreshLayout {
5929
5951
public fun <init> (Lcom/facebook/react/bridge/ReactContext;)V
0 commit comments