• 动画 帧动画


            <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();
            }
        }
  • 相关阅读:
    CTF SQL注入知识点
    Rot13加密算法
    LFU缓存
    Redability
    快排
    更新卡片的zIndex
    webshell文件下载器
    [转]背包九讲
    hihocoder第196周
    Python import容易犯的一个错误
  • 原文地址:https://www.cnblogs.com/zhaozilongcjiajia/p/13920264.html
Copyright © 2020-2023  润新知