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:
Siqi Liu
2016-05-31 07:44:29 -07:00
committed by Facebook Github Bot 4
parent eb69d036d5
commit 31eea8eee3
2 changed files with 24 additions and 24 deletions

View File

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