mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 22:43:10 +08:00
Android Dev Menu Options Reorder and Relabel
Summary:
Just rename and rearrange the dev menu options in Android, so as to be consistent with those in iOS.
{F61192593} {F61192595}
{F61192594} {F61192597}
There are other issues to solve on the inspector and profiling in Android, so I just ignore them for now.
Reviewed By: mkonicek
Differential Revision: D3361415
fbshipit-source-id: ffa823a0c54a27f7918e4e43ecea3c845d2a2f90
This commit is contained in:
committed by
Facebook Github Bot 4
parent
eb69d036d5
commit
31eea8eee3
@@ -274,6 +274,16 @@ public class DevSupportManagerImpl implements DevSupportManager {
|
||||
handleReloadJS();
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mDevSettings.isReloadOnJSChangeEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_live_reload_off)
|
||||
: mApplicationContext.getString(R.string.catalyst_live_reload),
|
||||
new DevOptionHandler() {
|
||||
@Override
|
||||
public void onOptionSelected() {
|
||||
mDevSettings.setReloadOnJSChangeEnabled(!mDevSettings.isReloadOnJSChangeEnabled());
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mDevSettings.isHotModuleReplacementEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_hot_module_replacement_off)
|
||||
@@ -285,16 +295,6 @@ public class DevSupportManagerImpl implements DevSupportManager {
|
||||
handleReloadJS();
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mDevSettings.isReloadOnJSChangeEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_live_reload_off)
|
||||
: mApplicationContext.getString(R.string.catalyst_live_reload),
|
||||
new DevOptionHandler() {
|
||||
@Override
|
||||
public void onOptionSelected() {
|
||||
mDevSettings.setReloadOnJSChangeEnabled(!mDevSettings.isReloadOnJSChangeEnabled());
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mApplicationContext.getString(R.string.catalyst_element_inspector),
|
||||
new DevOptionHandler() {
|
||||
@@ -304,6 +304,16 @@ public class DevSupportManagerImpl implements DevSupportManager {
|
||||
mReactInstanceCommandsHandler.toggleElementInspector();
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mDevSettings.isFpsDebugEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_perf_monitor_off)
|
||||
: mApplicationContext.getString(R.string.catalyst_perf_monitor),
|
||||
new DevOptionHandler() {
|
||||
@Override
|
||||
public void onOptionSelected() {
|
||||
mDevSettings.setFpsDebugEnabled(!mDevSettings.isFpsDebugEnabled());
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mApplicationContext.getString(R.string.catalyst_heap_capture),
|
||||
new DevOptionHandler() {
|
||||
@@ -323,16 +333,6 @@ public class DevSupportManagerImpl implements DevSupportManager {
|
||||
}
|
||||
}
|
||||
});
|
||||
options.put(
|
||||
mDevSettings.isFpsDebugEnabled()
|
||||
? mApplicationContext.getString(R.string.catalyst_perf_monitor_off)
|
||||
: mApplicationContext.getString(R.string.catalyst_perf_monitor),
|
||||
new DevOptionHandler() {
|
||||
@Override
|
||||
public void onOptionSelected() {
|
||||
mDevSettings.setFpsDebugEnabled(!mDevSettings.isFpsDebugEnabled());
|
||||
}
|
||||
});
|
||||
if (mCurrentContext != null &&
|
||||
mCurrentContext.getCatalystInstance() != null &&
|
||||
!mCurrentContext.getCatalystInstance().isDestroyed() &&
|
||||
|
||||
Reference in New Issue
Block a user