mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update ViewConfigs to support onEnter/onExit/onMove events
Summary: This diff updates the ViewConfigs in RN Android to add support for onEnter/onExit/onMove events. Open questions: - Should we just remove the override for RN VR: https://www.internalfb.com/code/ovrsource/[c82b81893393ad0c6f8c6e7f347e82bba39dc8cc]/arvr/js/libraries/reactvr/VrShellPanelLib/rn-support/setUpViewConfigOverrides.js - Should we use w3c naming now (e.g. onPointerEnter / onPointerExit / onPointerMove) ? or should we migrate to it later? what would be the effort for VR to migrate now to onPointerEnter / onPointerExit / onPointerMove? changelog: [Android][Changed] Add ViewConfigs to support onEnter/onExit/onMove events Reviewed By: RSNara Differential Revision: D32253129 fbshipit-source-id: 539d8672825c7f18f0b6a2570764a5988cd936bc
This commit is contained in:
committed by
Facebook GitHub Bot
parent
437b06f397
commit
44143b50fd
@@ -807,4 +807,22 @@ public class LayoutShadowNode extends ReactShadowNodeImpl {
|
||||
public void setShouldNotifyOnLayout(boolean shouldNotifyOnLayout) {
|
||||
super.setShouldNotifyOnLayout(shouldNotifyOnLayout);
|
||||
}
|
||||
|
||||
@ReactProp(name = "pointerenter")
|
||||
public void setShouldNotifyPointerEnter(boolean value) {
|
||||
// This method exists to inject Native View configs in RN Android VR
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
@ReactProp(name = "pointerleave")
|
||||
public void setShouldNotifyPointerLeave(boolean value) {
|
||||
// This method exists to inject Native View configs in RN Android VR
|
||||
// DO NOTHING
|
||||
}
|
||||
|
||||
@ReactProp(name = "pointermove")
|
||||
public void setShouldNotifyPointerMove(boolean value) {
|
||||
// This method exists to inject Native View configs in RN Android VR
|
||||
// DO NOTHING
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,9 @@ import java.util.Map;
|
||||
return MapBuilder.builder()
|
||||
.put("topContentSizeChange", MapBuilder.of(rn, "onContentSizeChange"))
|
||||
.put("topLayout", MapBuilder.of(rn, "onLayout"))
|
||||
.put("topPointerEnter", MapBuilder.of(rn, "pointerenter"))
|
||||
.put("topPointerLeave", MapBuilder.of(rn, "pointerleave"))
|
||||
.put("topPointerMove", MapBuilder.of(rn, "pointermove"))
|
||||
.put("topLoadingError", MapBuilder.of(rn, "onLoadingError"))
|
||||
.put("topLoadingFinish", MapBuilder.of(rn, "onLoadingFinish"))
|
||||
.put("topLoadingStart", MapBuilder.of(rn, "onLoadingStart"))
|
||||
|
||||
Reference in New Issue
Block a user