0

I am developing an app on Android 11 and I want to open only a specific settings screen from the app.

However, the settings screen in Android 11 is displayed in two columns, so I can select other settings from the menu on the left. Is there any way to hide the left menu (red frame)?

settings screen

The code below did not solve the problem.

startActivity(new Intent(ACTION_DATE_SETTINGS));
Intent intent = new Intent();
intent.setClassName(
    "com.android.settings",
    "com.android.settings.Settings$DateTimeSettingsActivity"
);
startActivity(intent);
Kobo
  • 3
  • 3

1 Answers1

0

there is no such option for that, security/privacy reasons. you can open some of these screens, like Wi-Fi settings or GPS, but not all

snachmsm
  • 17,866
  • 3
  • 32
  • 74
  • Thank you for your reply. Has there ever been a request to only allow date and time settings or something like that. Is there any way to disable the menu, such as displaying the menu but not being able to press it, or reducing the width of the menu? – Kobo Apr 18 '23 at 15:16
  • afaik there is no such `Intent` for that purpose... – snachmsm Apr 19 '23 at 07:13
  • It seems impossible to turn it off. thank you. – Kobo Apr 21 '23 at 04:38