CollapsingToolbarLayout accelerates animation speed

Is there a way to edit the animation speed for CollapsingToolabrLayout? I mean animation with a gradual decrease in scroll down.

+4
source share
1 answer

You can do this with (in ms):

Application: 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)

+8
source

Source: https://habr.com/ru/post/1652366/


All Articles