Migrate ReactPointerEventsView to kotlin (#47749)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47749

Migrate ReactPointerEventsView to kotlin

changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val

Reviewed By: cortinico

Differential Revision: D66217250

fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
This commit is contained in:
David Vacca
2024-12-16 18:39:54 -08:00
committed by Facebook GitHub Bot
parent 25ee3e805d
commit 45e4a3afce
2 changed files with 5 additions and 7 deletions
@@ -5,16 +5,14 @@
* 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 support pointer
* events handling. It is used to find the target View of a touch event.
* This interface should be implemented be native [View] subclasses that support pointer events
* handling. It is used to find the target View of a touch event.
*/
public interface ReactPointerEventsView {
/** Return the PointerEvents of the View. */
PointerEvents getPointerEvents();
public fun getPointerEvents(): PointerEvents
}
@@ -207,7 +207,7 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
@ReactProp(name = ViewProps.POINTER_EVENTS)
public open fun setPointerEvents(view: ReactViewGroup, pointerEventsStr: String?) {
view.pointerEvents = PointerEvents.parsePointerEvents(pointerEventsStr)
view.setPointerEvents(PointerEvents.parsePointerEvents(pointerEventsStr))
}
@ReactProp(name = "nativeBackgroundAndroid")