如何减慢微光效果的速度 [英] How to slow down the speed of shimmer effect

查看:71
本文介绍了如何减慢微光效果的速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了微光的 FrameLayout 演示,但是它运行得非常快,我想放慢这种效果的速度.如何减慢微光效果的速度以及如何使用该库的属性?

I have tried the demo of shimmer FrameLayout but it goes very fast and I want to slow down the speed of this effect. How to slow down the speed of shimmer effect and how to use the properties of this library?

推荐答案

您需要使用 app:shimmer_duration ="1500" 中设置动画速度> ShimmerFrameLayout

You need to use app:shimmer_duration="1500" to set speed of animation in ShimmerFrameLayout

尝试一下

<com.facebook.shimmer.ShimmerFrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:shimmer_duration="1500">

    <View
        android:layout_width="100dp"
        android:layout_height="8dp"
        android:background="#dddddd" />

</com.facebook.shimmer.ShimmerFrameLayout>

这篇关于如何减慢微光效果的速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆