Is there any way to edit animation speed for CollapsingToolabrLayout ? I mean the fade out animation of View thats collapsed on scroll down.
Asked
Active
Viewed 1.1k times
1 Answers
41
You can do it with (in ms):
app:scrimAnimationDuration="600"
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsingToolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/header_size"
android:fitsSystemWindows="true"
app:scrimAnimationDuration="600"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
...
</android.support.design.widget.CollapsingToolbarLayout>

Javatar
- 2,518
- 1
- 31
- 43
-
Is there any way to disable it completely, and let me change it however I wish? – android developer Oct 16 '19 at 07:50
-
2To disable the animation you have to remove the `app:contentScrim="?attr/colorPrimary"` – Henrique Jan 09 '20 at 11:28
-
1app:scrimAnimationDuration="0” in collapsing toolbar which is completely remove fade out animation – Viral Jul 09 '22 at 15:20