I added this code to my app ;
View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
But The code forces me to add "SuppressLint NewApi to MainActivity".Also there is an error about "View.SYSTEM_UI_FLAG_FULLSCREEN".Code says "CHANGE TO...." so what I must do I don't know.
Please help me.Thanks a lot.
Here is simple code to hide Navigation bar in Activity. It is working.
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);