diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java index 249738028f0afa..8e3b4680fd3733 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java @@ -24,6 +24,7 @@ import android.view.Gravity; import android.view.View; import android.widget.EditText; +import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.Nullable; @@ -526,17 +527,30 @@ public void onOptionSelected() { return; } - final TextView textView = new TextView(getApplicationContext()); - textView.setText("React Native DevMenu (" + getUniqueTag() + ")"); - textView.setPadding(0, 50, 0, 0); - textView.setGravity(Gravity.CENTER); - textView.setTextColor(Color.BLACK); - textView.setTextSize(17); - textView.setTypeface(textView.getTypeface(), Typeface.BOLD); + final LinearLayout header = new LinearLayout(getApplicationContext()); + header.setOrientation(LinearLayout.VERTICAL); + + final TextView title = new TextView(getApplicationContext()); + title.setText("React Native Dev Menu (" + getUniqueTag() + ")"); + title.setPadding(0, 50, 0, 0); + title.setGravity(Gravity.CENTER); + title.setTextColor(Color.DKGRAY); + title.setTextSize(16); + title.setTypeface(title.getTypeface(), Typeface.BOLD); + + final TextView jsExecutorLabel = new TextView(getApplicationContext()); + jsExecutorLabel.setText(getJSExecutorDescription()); + jsExecutorLabel.setPadding(0, 20, 0, 0); + jsExecutorLabel.setGravity(Gravity.CENTER); + jsExecutorLabel.setTextColor(Color.GRAY); + jsExecutorLabel.setTextSize(14); + + header.addView(title); + header.addView(jsExecutorLabel); mDevOptionsDialog = new AlertDialog.Builder(context) - .setCustomTitle(textView) + .setCustomTitle(header) .setItems( options.keySet().toArray(new String[0]), (dialog, which) -> { @@ -551,6 +565,10 @@ public void onOptionSelected() { } } + private String getJSExecutorDescription() { + return "Running " + getReactInstanceDevHelper().getJavaScriptExecutorFactory().toString(); + } + /** * {@link ReactInstanceDevCommandsHandler} is responsible for enabling/disabling dev support when * a React view is attached/detached or when application state changes (e.g. the application is