0

I want to disable the immersive mode (i.e. pop out of the android statusbar on swiping down at the very top of the screen) for one of the activity in my application. I'm using a fullscreen theme in my activity, but whenever i swipe down from the top area statusbar pops out. I want to disable that functionality.

I already tried the solution given here

But it didn't work for me on API 24.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

0

Have you tried fullscreen activity? It looks like this:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                            WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.main);
}

set this before content view

  • Have you tried creating a new activity and choosing fullscreen activity from gallery? –  Oct 23 '17 at 06:48