i have tried many ways but it overlaps toolbar and status bar.Also it gives back press bottom navigation default. i have added below code-
 @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
  Window w = getWindow();  w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);//allow window to extend outside of the screen.
            w.addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);// override FLAG_FULLSCREEN and force the screen decorations (such as the status bar) to be shown.         w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_ATTACHED_IN_DECOR);            w.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);           w.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
        }
        super.onCreate(savedInstanceState);
    }

 
     
    