title: Prevent BottomSheetDialogFragment covering navigation bar
body: <p>I'm using really naive code to show a bottom sheet dialog fragment:</p>
  
  <pre><code>class LogoutBottomSheetFragment : BottomSheetDialogFragment() {
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
          val view = inflater.inflate(R.layout.view_image_source_chooser, container, false)
          return view
      }
  }
  </code></pre>
  
  <p>This is how I called this dialog:</p>
  
  <pre><code>LogoutBottomSheetFragment().show(supportFragmentManager, "logout")
  </code></pre>
  
  <p>But I get this horrible shown in the image below. 
  How can I keep the navigation bar white (the bottom bar where the back/home software buttons are)?</p>
  
  <p><img src="https://i.stack.imgur.com/81eMC.png" width="250"></p>
  
  <p>App Theme I'm using:</p>
  
  <pre><code> &lt;!-- Base application theme. --&gt;
  &lt;style name="BaseAppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;!-- Customize your theme here. --&gt;
  &lt;/style
  
  &lt;style name="AppTheme" parent="BaseAppTheme"&gt;
      &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
      &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
  
      &lt;!-- Main theme colors --&gt;
      &lt;!--   your app branding color for the app bar --&gt;
      &lt;item name="android:colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;!--   darker variant for the status bar and contextual app bars --&gt;
      &lt;item name="android:colorPrimaryDark"&gt;@android:color/white&lt;/item&gt;
      &lt;!--   theme UI controls like checkboxes and text fields --&gt;
      &lt;item name="android:colorAccent"&gt;@color/charcoal_grey&lt;/item&gt;
  
      &lt;item name="colorControlNormal"&gt;@color/charcoal_grey&lt;/item&gt;
      &lt;item name="colorControlActivated"&gt;@color/charcoal_grey&lt;/item&gt;
      &lt;item name="colorControlHighlight"&gt;@color/charcoal_grey&lt;/item&gt;
  
      &lt;item name="android:textColorPrimary"&gt;@color/charcoal_grey&lt;/item&gt;
      &lt;item name="android:textColor"&gt;@color/charcoal_grey&lt;/item&gt;
  
      &lt;item name="android:windowBackground"&gt;@color/white&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>I've also tried to override the setupDialog instead of the onCreateView, but still happens:</p>
  
  <pre><code>    @SuppressLint("RestrictedApi")
  override fun setupDialog(dialog: Dialog, style: Int) {
      super.setupDialog(dialog, style)
      val view = View.inflate(context, R.layout. view_image_source_chooser,null)
      dialog.setContentView(view)
  }
  </code></pre>