Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CollapsingToolbarLayout fade out animation speed

Is there any way to edit animation speed for CollapsingToolabrLayout ? I mean the fade out animation of View thats collapsed on scroll down.

like image 826
TheJudge Avatar asked Aug 24 '16 16:08

TheJudge


1 Answers

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>

Also see: https://developer.android.com/reference/android/support/design/widget/CollapsingToolbarLayout.html#setScrimAnimationDuration(long)

like image 105
Javatar Avatar answered Sep 19 '22 17:09

Javatar