android – CollapsingToolbarLayout淡出动画速度

有没有办法为CollapsingToolabrLayout编辑动画速度?我的意思是视图的淡出动画在向下滚动时折叠了.

解决方法

您可以使用(以毫秒为单位):

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>

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

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...