Skip to content

Commit e91fb05

Browse files
RSNarafacebook-github-bot
authored andcommitted
DevMenu: Change "Toggle Inspector" to Show/Hide Element Inspector
Summary: Rationale: - This makes the element inspector button consistent with the Fast Refresh, Perf Monitor and other buttons in the DevMenu - This makes the button more informative Changelog: [Android][Changed] Rename the "Toggle Inspector" DevMenu item to "Hide/Show Element Inspector" Reviewed By: JoshuaGross Differential Revision: D29146871 fbshipit-source-id: 8e8c19217ea2ff2f1d176521aa22200058e7e643
1 parent 1816536 commit e91fb05

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,9 @@ public void onClick(DialogInterface dialog, int which) {
474474
});
475475

476476
options.put(
477-
// NOTE: `isElementInspectorEnabled` is not guaranteed to be accurate.
478-
mApplicationContext.getString(R.string.catalyst_inspector),
477+
mDevSettings.isElementInspectorEnabled()
478+
? mApplicationContext.getString(R.string.catalyst_inspector_stop)
479+
: mApplicationContext.getString(R.string.catalyst_inspector),
479480
new DevOptionHandler() {
480481
@Override
481482
public void onOptionSelected() {

ReactAndroid/src/main/res/devsupport/values/strings.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
<string name="catalyst_hot_reloading_stop" project="catalyst" translatable="false">Disable Fast Refresh</string>
1717
<string name="catalyst_hot_reloading_auto_disable" project="catalyst" translatable="false">Disabling Fast Refresh because it requires a development bundle.</string>
1818
<string name="catalyst_hot_reloading_auto_enable" project="catalyst" translatable="false">Switching to development bundle in order to enable Fast Refresh.</string>
19-
<string name="catalyst_inspector" project="catalyst" translatable="false">Toggle Inspector</string>
19+
<string name="catalyst_inspector" project="catalyst" translatable="false">Show Element Inspector</string>
20+
<string name="catalyst_inspector_stop" project="catalyst" translatable="false">Hide Element Inspector</string>
2021
<string name="catalyst_perf_monitor" project="catalyst" translatable="false">Show Perf Monitor</string>
2122
<string name="catalyst_perf_monitor_stop" project="catalyst" translatable="false">Hide Perf Monitor</string>
2223
<string name="catalyst_settings" project="catalyst" translatable="false">Settings</string>

0 commit comments

Comments
 (0)