- Изменить тему: < /li>
< /ol>
Код: Выделить всё
false true true false
Main activity (extending FragmentActivity, the only activity I have since I'm using fragments):
Код: Выделить всё
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this); //apparently for API 35+ this is the only thing I need
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_main);
... }
Код: Выделить всё
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
EdgeToEdge.enable(this);
Window window = getWindow();
View decorView = getWindow().getDecorView();
WindowCompat.setDecorFitsSystemWindows(window, false);
WindowInsetsControllerCompat controllerCompat = new WindowInsetsControllerCompat(window, decorView);
controllerCompat.hide(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.navigationBars());
controllerCompat.setSystemBarsBehavior(WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);

Я также удалил все из моих тем.>
Подробнее здесь: https://stackoverflow.com/questions/793 ... -confusion
Мобильная версия