zoukankan      html  css  js  c++  java
  • 动画 帧动画

            <TextView
                android:id="@+id/fa_search_room_history_tv_live_status"
                android:layout_width="wrap_content"
                android:layout_height="16dp"
                android:background="@drawable/fa_pub_list_label_second"
                android:gravity="center"
                android:lines="1"
                android:paddingLeft="6dp"
                android:paddingRight="6dp"
                android:textColor="@color/fa_white"
                android:textSize="@dimen/fa_text_size_10"
                android:drawablePadding="@dimen/fa_common_3dp"
                android:drawableLeft="@drawable/fa_live_play_anim"
                android:visibility="gone"
                tools:visibility="visible" />
    <?xml version="1.0" encoding="utf-8"?>
    <animation-list xmlns:android="http://schemas.android.com/apk/res/android"
                    android:oneshot="false">
    
        <item
            android:drawable="@drawable/live_play_anim1"
            android:duration="100"/>
        <item
            android:drawable="@drawable/live_play_anim2"
            android:duration="100"/>
        <item
            android:drawable="@drawable/live_play_anim3"
            android:duration="100"/>
        <item
            android:drawable="@drawable/live_play_anim4"
            android:duration="100"/>
        <item
            android:drawable="@drawable/live_play_anim5"
            android:duration="100"/>
        <item
            android:drawable="@drawable/live_play_anim6"
            android:duration="100"/>
        <item
            android:drawable="@drawable/live_play_anim7"
            android:duration="100"/>
    
    </animation-list>
     private void startAnimation(TextView liveStatusTv){
            Drawable backgroundSec = liveStatusTv.getBackground();
            backgroundSec.setColorFilter(Color.parseColor("#FF4466"), PorterDuff.Mode.MULTIPLY);
            Drawable[] drawables = liveStatusTv.getCompoundDrawables();
            if(drawables[0] != null && drawables[0] instanceof AnimationDrawable){
                AnimationDrawable liveStatusAnimation = (AnimationDrawable)drawables[0];
                liveStatusAnimation.start();
            }
        }
  • 相关阅读:
    boxcox1p归一化+pipeline+StackingCVRegressor
    rt-thread调度锁与关闭中断深度探究
    树莓派4最小化安装Linux
    树莓派4可以不用SD卡启动
    树莓派JTAG详细使用笔记
    树莓派上玩街机游戏
    用树莓派制作红白游戏机
    树莓派4上使用uboot+tftp调试rt-thread程序
    在window上搭建树莓派4b的RT-Thread开发环境2
    树莓派上运行RT-Thread并通过esp8266连接网络
  • 原文地址:https://www.cnblogs.com/zhaozilongcjiajia/p/13920264.html
Copyright © 2011-2022 走看看