//Remove the effect of
the hidden navigation bar at the bottom. Commenting out this line in the code will not hide the navigation bar.
//View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
//Remove the height effect of Activity occupying the entire screen
and include the code of these methods in the code
//Display display = windowManager.getDefaultDisplay();
// DisplayMetrics dm = new DisplayMetrics();
// display.getMetrics(dm);