I\'ve used a modified version of bottom-sheet library (here, based on this library, also wrote about it here), in order to have a nice transition between co
UPDATE Link to the full answer in where you can find all the explanation about how to get full behaviors like Google Maps.
Helping you with what you want
what I wanted, which is the 3-phases I've done before
Using Support Library 23.x+ you can do it modifying default BottomSheetBehavior
adding one more stat with following steps:
CoordinatorLayout.Behavior<V>
BottomSheetBehavior
file to your new one.Modify the method clampViewPositionVertical
:
Add a new state
public static final int STATE_ANCHOR_POINT = X;
Modify the next methods: onLayoutChild
, onStopNestedScroll
, BottomSheetBehavior<V> from(V view)
and setState
(optional)
So now you have those states:
STATE_HIDDEN
STATE_COLLAPSED
STATE_DRAGGING
STATE_ANCHOR_POINT
STATE_EXPANDED.
You can use setBottomSheetCallback
like you do in original BottomSheetBehavior
The XML (without anything about parallax image like google maps) looks like:
<CoordinatorLayout>
<FrameLayout/>
<AppBarLayout>
<CollapsingToolbarLayout>
<Toolbar/>
</CollapsingToolbarLayout >
</AppBarLayout >
<NestedScrollView>
<LinearLayout/>
</NestedScrollView>
</CoordinatorLayout >
I'm going to add a link to the example project where you can find what you are looking for
And here is how its looks like:
[]
You can use this library. As far as I have seen there is no issue with this library.