超酷炫的Android碎纸机效果推荐
作者:daisy 时间:2022-05-21 01:20:44
在Android开发中,有时候可能会要用到碎纸机的效果,今天小编为大家整理好代码,一起来看看吧。
首先来看下效果图
实例代码
xml
<com.ldoublem.PaperShredderlib.PaperShredderView
android:layout_width="200dp"
android:id="@+id/ps_delete2"
android:layout_height="220dp"
paper:sherderBgColor="#f4c600"
paper:sherderText="清理中"
paper:sherderType="0"
paper:sherderPaperEnterColor="#56abe4"
paper:sherderTextShadow="false"
paper:sherderTextColor="#99101010"
paper:sherderPaperColor="#dbdbdb"
paper:sherderProgress="false"
/>
java
mPaperShredderView.setShrededType(PaperShredderView.SHREDEDTYPE.Piece);//纸片效果和纸条效果
mPaperShredderView.setSherderProgress(false);
mPaperShredderView.setTitle("清除数据");
mPaperShredderView.setTextColor(Color.BLACK);
mPaperShredderView.setPaperColor(Color.BLACK);
mPaperShredderView.setBgColor(Color.WHITE);
mPaperShredderView.setTextShadow(false);
mPaperShredderView.setPaperEnterColor(Color.BLACK);
mPaperShredderView.startAnim(1000);
mPaperShredderView.stopAnim();
学会利用上面的两段代码,Android开发者就可以轻松实现碎纸机的动画效果,希望本文对大家的学习有所帮助,谢谢大家支持脚本之家。
标签:android,动画
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
基于idea Maven中的redis配置使用详解
2023-11-29 11:57:28
使用java生成json时产生栈溢出错误问题及解决方案
2023-01-09 17:41:10
![](https://img.aspxhome.com/file/2023/7/128817_0s.png)
详解SpringMVC如何进行数据回显
2023-09-12 08:48:15
SpringBoot使用自定义注解+AOP+Redis实现接口限流的实例代码
2022-04-11 09:15:45
![](https://img.aspxhome.com/file/2023/2/101792_0s.png)
完美解决Spring Boot前端的Access-Control-Allow-Origin跨域问题
2023-09-19 10:16:28
mybatis多个区间处理方式(双foreach循环)
2023-11-26 09:01:42
![](https://img.aspxhome.com/file/2023/2/59882_0s.png)
JAVA提高第八篇 动态代理技术
2023-07-19 07:13:12
![](https://img.aspxhome.com/file/2023/9/62829_0s.jpg)
@CacheEvict 清除多个key的实现方式
2023-11-21 08:28:04
WPF实现时钟特效
2021-11-13 11:16:24
![](https://img.aspxhome.com/file/2023/6/102276_0s.jpg)
Mybatis步骤分解实现一个增删改查程序
2021-09-16 01:12:43
![](https://img.aspxhome.com/file/2023/0/65730_0s.png)
Android基于开源项目xutils3实现下载
2023-05-06 06:24:15
![](https://img.aspxhome.com/file/2023/1/137841_0s.jpg)
Swagger实现动态条件注入与全局拦截功能详细流程
2023-11-23 13:41:05
C# wpf简单颜色板的实现
2022-02-11 20:08:38
![](https://img.aspxhome.com/file/2023/8/129768_0s.png)
Struts2配置文件中使用通配符的方法(三种形式)
2022-08-21 01:53:40
Spring事务事件监控的实现
2022-11-28 06:19:13
Java 执行CMD命令或执行BAT批处理方式
2022-10-15 03:57:38
![](https://img.aspxhome.com/file/2023/3/67663_0s.png)
javafx实现五子棋游戏
2022-02-01 07:00:01
![](https://img.aspxhome.com/file/2023/2/129192_0s.png)
SpringBoot里使用Servlet进行请求的实现示例
2021-09-17 11:47:37
C#代码实现PDF文档操作类
2022-01-30 07:03:02
Java Swing JPanel面板的使用方法
2023-02-13 12:04:49
![](https://img.aspxhome.com/file/2023/2/80892_0s.png)