title: Modal Bottom Sheet shows navigation bar in full screen activities
body: <p>I have implemented a Modal Bottom Sheet Fragment in a FullScreen Activity. The problem is that when I show the fragment, the navigation bar appears. Here is my code for showing the fragment:</p>
  
  <pre><code>OptionsFragment optionsFragment=OptionsFragment.newInstance();
  optionsFragment.show(getSupportFragmentManager(),"options_fragment");
  </code></pre>
  
  <p>And this is the fragment:</p>
  
  <pre><code>public class OptionsFragment extends BottomSheetDialogFragment {
  
  
      public OptionsFragment() {
      }
  
      public static OptionsFragment newInstance() {
          OptionsFragment fragment = new OptionsFragment();
          return fragment;
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View view=inflater.inflate(R.layout.options_layout,container,false);
          return view;
      }
  
  }
  </code></pre>
  
  <p>And finally, this is how I hide the toolbar and the navigation bar at the beginning of the activity:</p>
  
  <pre><code>mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
                  | View.SYSTEM_UI_FLAG_FULLSCREEN
                  | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                  | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
                  | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                  | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
  </code></pre>