mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support commands as strings in AndroidDrawerLayout
Summary: See https://github.com/facebook/react-native/commit/3cae6fa950eed54bccccf61a28c0e85d5a004c6c for more context Reviewed By: JoshuaGross Differential Revision: D16008549 fbshipit-source-id: a574c203d4481b4cfe84519f846cee858ceda227
This commit is contained in:
committed by
Facebook Github Bot
parent
b25d22aae6
commit
35570a1b63
+15
@@ -153,6 +153,21 @@ public class ReactDrawerLayoutManager extends ViewGroupManager<ReactDrawerLayout
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveCommand(
|
||||
ReactDrawerLayout root,
|
||||
String commandId,
|
||||
@Nullable ReadableArray args) {
|
||||
switch (commandId) {
|
||||
case "openDrawer":
|
||||
root.openDrawer();
|
||||
break;
|
||||
case "closeDrawer":
|
||||
root.closeDrawer();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Map getExportedViewConstants() {
|
||||
return MapBuilder.of(
|
||||
|
||||
Reference in New Issue
Block a user