Search code examples
androidbuttonstatusbar

Show and Hide the status bar when button clicked:Android


I am working around one android app while i need to show and hide the status bar when button clicked.is it possible?please help to solve this issue.


Solution

  • getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    // Show status bar
    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);