title: Can't hide Bottom Sheet, Android
body: <p>I'm having problems with my <a href="/questions/tagged/bottom-sheet" class="post-tag" title="show questions tagged &#39;bottom-sheet&#39;" rel="tag">bottom-sheet</a> because when I open the activity it is on, blocking the view
  <a href="https://i.stack.imgur.com/b60r8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/b60r8.png" alt="enter image description here"></a></p>
  
  <p>This happens, I think, because of the XML attribute declaring the <a href="/questions/tagged/bottom-sheet" class="post-tag" title="show questions tagged &#39;bottom-sheet&#39;" rel="tag">bottom-sheet</a> with 350dp of height:</p>
  
  <pre><code>&lt;android.support.v4.widget.NestedScrollView
      android:id="@+id/bottom_sheet"
      android:layout_width="match_parent"
      android:layout_height="350dp"
      android:background="?android:attr/windowBackground"
      android:clipToPadding="true"
      app:layout_behavior="android.support.design.widget.BottomSheetBehavior"&gt;
  </code></pre>
  
  <p>The thing is, I can't change that value to 0dp because the next time when I try to open the <a href="/questions/tagged/bottom-sheet" class="post-tag" title="show questions tagged &#39;bottom-sheet&#39;" rel="tag">bottom-sheet</a>, there is no <a href="/questions/tagged/bottom-sheet" class="post-tag" title="show questions tagged &#39;bottom-sheet&#39;" rel="tag">bottom-sheet</a>, because the height is 0dp, so it won't show anything. 
  My question is, is there a way to declare the <a href="/questions/tagged/bottom-sheet" class="post-tag" title="show questions tagged &#39;bottom-sheet&#39;" rel="tag">bottom-sheet</a> off? (I've tried to setState to STATE_COLLAPSED but didn't work).
  Bellow is the java code that interacts with the Bottom Sheet.
   JAVA:</p>
  
  <pre><code>View bottomSheet = findViewById( R.id.bottom_sheet );
          mBottomSheetBehavior = BottomSheetBehavior.from(bottomSheet);
          mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
          mBottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
              @Override
              public void onStateChanged(View bottomSheet, int newState) {
                  if (newState == BottomSheetBehavior.STATE_COLLAPSED) {
                      //mBottomSheetBehavior.setPeekHeight(0);
                      //mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
                      //mBottomSheetBehavior.isHideable();
                  }
              }
  
              @Override
              public void onSlide(View bottomSheet, float slideOffset) {
  
              }
          });
  </code></pre>