I work on Android API 30+, and I want to make a fullscreen app.
I disabled the navigationBars()
here :
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivitySplashscreenBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
mContentView = binding.fullscreenContent;
mContentView.getWindowInsetsController().hide(WindowInsets.Type.navigationBars());
However, when I click anywhere, the navigationBars() come back.
If I do a second click/touch, it disappears again, and this situation is every time.
Any ideas?
After few hours, I found a solution :
Depreciated since Android 30+. For last API, use :
Thanks to @Hong Nguyen