title: Set state of BottomSheetDialogFragment to expanded
body: <p>How do you set the state of a fragment extending <code>BottomSheetDialogFragment</code> to expanded using <code>BottomSheetBehavior#setState(STATE_EXPANDED)</code> using the Android Support Design Library (v23.2.1)?</p>
  
  <p><a href="https://code.google.com/p/android/issues/detail?id=202396" rel="noreferrer">https://code.google.com/p/android/issues/detail?id=202396</a> says:</p>
  
  <blockquote>
    <p>Bottom sheets are set to STATE_COLLAPSED at first. Call BottomSheetBehavior#setState(STATE_EXPANDED) if you want to expand it. Note that you cannot call the method before view layouts.</p>
  </blockquote>
  
  <p>The <a href="http://android-developers.blogspot.com.au/2016/02/android-support-library-232.html" rel="noreferrer">suggested practice</a> requires a view to be inflated first, but I'm not sure how I'll set the BottomSheetBehaviour onto a fragment (<code>BottomSheetDialogFragment</code>).</p>
  
  <pre><code>View bottomSheet = coordinatorLayout.findViewById(R.id.bottom_sheet);  
  BottomSheetBehavior behavior = BottomSheetBehavior.from(bottomSheet);  
  </code></pre>