Support commands as strings in AndroidDrawerLayout

Summary: See 3cae6fa950 for more context

Reviewed By: JoshuaGross

Differential Revision: D16008549

fbshipit-source-id: a574c203d4481b4cfe84519f846cee858ceda227
This commit is contained in:
Eli White 2019-06-26 14:04:01 -07:00 коммит произвёл Facebook Github Bot
Родитель b25d22aae6
Коммит 35570a1b63
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -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(