android AnimationSet 圆形放大缩小动画

本文介绍如何在Android中使用AnimationSet实现圆形的放大缩小动画。通过组合两个动画并设置延迟,实现流畅的动画效果。同时提供相关的XML布局文件和Java代码示例。

设计想法:
两个动画,其中一个延迟播放,延迟播放的时间刚好是第一个动画播放结束的时间(还有一个用AnimatorSet写的,那个可以循环播放,这个循环播放的方法我不会,我是新手菜鸟,写的很菜。。。 )

circle.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <corners android:radius="65dp"/>
    <solid android:color="@color/teal_200"/>
</shape>

circle_k.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <corners android:radius="300dp"/>
    <stroke android:width="5dp"
        android:color="@color/teal_200"/>
</shape>

activity.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

m0_46252842

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值