1

I wonder how to disable action bar menu opening on drag.

@Override
public void onResume() {
    super.onResume();
    if(getActivity() != null)
        ((AppCompatActivity)getActivity()).getSupportActionBar().hide();
}
@Override
public void onStop() {
    super.onStop();
    if(getActivity() != null)
        ((AppCompatActivity)getActivity()).getSupportActionBar().show();
}

I used this code to hide the bar in my fragment, but it still can be opened by dragging the left side of the screen.

Jakub Balicki
  • 180
  • 1
  • 11
  • here you can find what you are upto [https://stackoverflow.com/questions/18413116/why-i-cant-lock-drawerlayout-with-layout-gravity/18413276#18413276] short story is this `mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); ` – Salman Aziz Sep 25 '19 at 19:38

0 Answers0