title: Android Support BottomSheetBehavior additional anchored state
body: <p>I have been using the <a href="https://github.com/umano/AndroidSlidingUpPanel" rel="nofollow noreferrer">AndroidSlidingUpPanel</a> library in my app. With versions of the Android Design Support Library since 23.1.1, this breaks some things in my layout. Since the newest versions introduce the <a href="http://developer.android.com/reference/android/support/design/widget/BottomSheetBehavior.html" rel="nofollow noreferrer">BottomSheetBehavior</a>, I'm looking to replace the AndroidSlidingUpPanel library and use BottomSheetBehavior instead. However, BottomSheetBehavior only has 3 states, hidden, collapsed, and expanded (as well as 2 intermediate states dragging and settling). AndroidSlidingUpPanel additionally has the anchored state, which is a state the panel snaps to in between collapsed and expanded. How could I use BottomSheetBehavior and get this additional anchored state?</p>
  <p>Google's Maps app has this behavior for example.</p>
  <p><strong>Hidden:</strong></p>
  <p><a href="https://i.stack.imgur.com/jfa7I.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jfa7I.jpg" width="250"></a></p>
  <p><strong>Collapsed:</strong></p>
  <p><a href="https://i.stack.imgur.com/Q2M6B.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q2M6B.jpg" width="250"></a></p>
  <p><strong>Dragging (between collapsed and anchored):</strong></p>
  <p><a href="https://i.stack.imgur.com/KdNcg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KdNcg.jpg" width="250"></a></p>
  <p><strong>Anchored:</strong></p>
  <p><a href="https://i.stack.imgur.com/8yAVd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8yAVd.jpg" width="250"></a></p>
  <p><strong>Dragging (between anchored and expanded):</strong></p>
  <p><a href="https://i.stack.imgur.com/TcGuf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TcGuf.jpg" width="250"></a></p>
  <p><strong>Expanded:</strong></p>
  <p><a href="https://i.stack.imgur.com/AhsZn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AhsZn.jpg" width="250"></a></p>
  <p>There are some parallax effects going on with an optional image sliding up over the map in the anchored state when locations have them. And when becoming fully expanded, the location name becomes the action bar title. I'd eventually be interested in achieving something similar as well.</p>
  <p>My first instinct is that the anchored state is in fact the expanded state, with the empty space above the panel, where the map is still visible, being a transparent portion of the view. Then the dragging between the anchored and expanded states is just scrolling the contents of the panel view itself.</p>
  <p>This is validated by the fact that while in the anchored state you can continue to scroll the panel up by swiping the visible map region above the panel. This invisible portion of the view must expand into its area (as the optional images visibly do) while swiping up from the collapsed state though, as it is not possible to slide the panel up from the map in the collapsed state. I suppose I could go this route but wanted to see if there were any better approaches out there.</p>