mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-06 09:13:27 +08:00
Initialize Event Emitter as part of UIManagerModule
Reviewed By: achen1 Differential Revision: D8216184 fbshipit-source-id: 3b188804e2dad2b112f566da49a939eb4338713d
This commit is contained in:
committed by
Facebook Github Bot
parent
0f10e03dd8
commit
6e359c4589
@@ -10,6 +10,7 @@ import android.widget.CompoundButton;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.uimanager.SimpleViewManager;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
import com.facebook.react.uimanager.UIManagerModule;
|
||||
import com.facebook.react.uimanager.ViewProps;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
@@ -25,7 +26,7 @@ public class ReactCheckBoxManager extends SimpleViewManager<ReactCheckBox> {
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
ReactContext reactContext = (ReactContext) buttonView.getContext();
|
||||
reactContext
|
||||
.<EventDispatcher>getEventDispatcher()
|
||||
.getNativeModule(UIManagerModule.class).getEventDispatcher()
|
||||
.dispatchEvent(new ReactCheckBoxEvent(buttonView.getId(), isChecked));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user