5

With old-fashioned flags we could create an app with translucent param applied only to a status bar.

window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or 
    View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
window.statusBarColor = Color.TRANSPARENT

But in a new api window.setDecorFitsSystemWindows(false) applies translucent for both - status bar and navigation bar. So, the new api provides less functionality or I'm missing something?

blinker
  • 599
  • 5
  • 18
  • You can still use an opaque color for the navigation bar by setting such a color for the navigation bar with: `NON_TRANLUCENT_COLOR` – Ovi Trif Oct 10 '22 at 13:59
  • So you mean that with setDecorFitsSystemWindows() and android:navigationBarColor=NON_TRANLUCENT_COLOR simultaneously my window will not stretch under android navigation bar? – blinker Jan 11 '23 at 10:23

0 Answers0