2

I'm working on a German Learning app project, inspired by Duolingo app.

I need to make my app to be a little bit similar with this feature. It's like making the user to focus on the quiz, and ignore everything in status bar (notification bar). Now, what I need is i want to hide the icons on notification bar. Is there a way to do so?

This is what I want

This is what I want

And this is the fact

And this is the fact

OneCricketeer
  • 126,858
  • 14
  • 92
  • 185

2 Answers2

4

You can dim the status and navigation bars by setting the SYSTEM_UI_FLAG_LOW_PROFILE flag.

View decorView = getActivity().getWindow().getDecorView();
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);

https://developer.android.com/training/system-ui/dim.html

This decoration is reset whenever the keyboard is made visible, but you can watch for the keyboard being hidden (using an onGlobalLayoutListener) and resetting the flag.

stuartmd
  • 41
  • 2
0

You could just disable notifications for the offending apps in your device's settings menu. I'm looking for an option to hide them from the status bar while keeping notifications in the shade and on the lock screen. Apparently not on a Samsung device.

Ulf
  • 1