I want to implement a collapsing toolbar like google Play Store. I have achieved functionality somewhat but that is only working for portrait Screen. Here is a sample of screens
In this pretty similar issue: collapsing toolbar layout like google play store, you would find an answer as below:
View inside
CollapsingToolbarLayout
no need to setapp:layout_scrollFlags
. No effect. Base on my code, changeapp:layout_scrollFlags
inCollapsingToolbarLayout
toapp:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"
and setminHeight
for it.As your toolbar is
"pin"
, soenterAlwaysCollapsed
will call it when you scroll down.
In the comment to that post, you would find also a hint:
add
app:contentScrim="?attr/colorPrimary"
to your collapsingtoolbarlayout. It is no need two toolbars to implement this effect
EDIT: Here you would find an interview with a guy responsible for Google Play Store, he's talking about how he build design in Play Store App:
[UDACITY] Interview with Kirill Grouchnikov, part 1
[UDACITY] Interview with Kirill Grouchnikov, part 2
Hope it help