5

setSystemUiVisibility and View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR are deprecated.

What's the equivalent to this:

View decor = getWindow().getDecorView();

decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

And this:

decor.setSystemUiVisibility(0);

I have tried APPEARANCE_LIGHT_NAVIGATION_BARS and WindowInsetsController but I don't know how to put it together.

The closest example I came across is this:

StackOverflow example

Anatoly
  • 20,799
  • 3
  • 28
  • 42
NewCEO
  • 51
  • 1
  • 7
  • 1
    Duplicate of [android.view.View.systemUiVisibility deprecated. What is the replacement?](https://stackoverflow.com/questions/62577645/android-view-view-systemuivisibility-deprecated-what-is-the-replacement) and [How to change systemUIVisibility on SdkVersion 30](https://stackoverflow.com/questions/62624644/how-to-change-systemuivisibility-on-sdkversion-30?noredirect=1&lq=1) – Nicolas Jul 19 '20 at 01:13
  • I already see that post, it did not help at all and it is in kotlin not java – NewCEO Jul 19 '20 at 01:38
  • 7
    I agree, I don't think this is a duplicate. Related, but not duplicate. – Ryan M Jul 20 '20 at 08:07
  • Agreed with my fellow programmers above... This is a Java post and the linked answers are strictly Kotlin... So many try-hards out there with an itchy dupe question trigger finger... Hope the rep points were worth it man. – austinw Jan 28 '21 at 02:52
  • Maybe this helps https://stackoverflow.com/questions/65423778/system-ui-flag-light-status-bar-and-flag-translucent-status-is-deprecated/66089566#66089566 – Jaco Mar 12 '21 at 10:20

0 Answers0