类似今日头条点赞动画 连击动画 SuperLike案例
kenrry1992 · 825浏览量 · 发布于2020-04-10
作者Qiu800820,源码SuperLike,仿今日头条点赞喷射表情动画,主要用于点赞防抖事件的交互提示,这里只提供交互View 防抖功能可以根据Rx自行实现。
使用
compile 'com.sum.slike:library:0.2.1'
参数含义
自定义属性名字 | 参数含义 |
---|---|
eruption_element_amount | 一次喷射的element数量 |
max_eruption_total | 最大同时喷射次数 |
show_emoji | 是否显示Emoji表情喷射动画 |
show_text | 是否显示Combo文字 |
代码演示
1.基础样式(666 + 文字)
BitmapProvider.Provider provider = new BitmapProvider.Builder(this).build(); superLikeLayout.setProvider(provider); superLikeLayout.launch(x, y);
2.自定义样式(随机emoji + 自定义文字)
DrawableArray是喷射Emoji的Drawable。
NumberDrawableArray是连续点赞数字Drawable(0~10)
LevelDrawableArray是连续点赞等级Drawable(目前分为3个等级 010, 1020, 20~30+)
BitmapProvider.Provider provider = new BitmapProvider.Builder(this) .setDrawableArray(new int[]{R.mipmap.emoji_1, R.mipmap.emoji_2, R.mipmap.emoji_3, R.mipmap.emoji_4, R.mipmap.emoji_5, R.mipmap.emoji_6, R.mipmap.emoji_7, R.mipmap.emoji_8, R.mipmap.emoji_9, R.mipmap.emoji_10, R.mipmap.emoji_11, R.mipmap.emoji_12, R.mipmap.emoji_13, R.mipmap.emoji_14, R.mipmap.emoji_15, R.mipmap.emoji_16, R.mipmap.emoji_17, R.mipmap.emoji_18, R.mipmap.emoji_19, R.mipmap.emoji_20}) .setNumberDrawableArray(new int[]{R.mipmap.multi_digg_num_0, R.mipmap.multi_digg_num_1, R.mipmap.multi_digg_num_2, R.mipmap.multi_digg_num_3, R.mipmap.multi_digg_num_4, R.mipmap.multi_digg_num_5, R.mipmap.multi_digg_num_6, R.mipmap.multi_digg_num_7, R.mipmap.multi_digg_num_8, R.mipmap.multi_digg_num_9}) .setLevelDrawableArray(new int[]{R.mipmap.multi_digg_word_level_1, R.mipmap.multi_digg_word_level_2, R.mipmap.multi_digg_word_level_3}) .build(); superLikeLayout.setProvider(provider); superLikeLayout.launch(x, y);
源码使用过程中,如无法搭建或有增加其他功能需求,可联系QQ:236-0248-666 ,付费搭建安装修改服务!
温馨提示:网站源码只作为学习或研究使用,如需商业使用请购买正版!
温馨提示:网站源码只作为学习或研究使用,如需商业使用请购买正版!
相关推荐
一个天气预报的下雨动画效果案例源码WeatherView
相关信息
程序猿小军 · 632浏览 · 2020-12-17 16:39:01
用变形动画转换的案例源码
相关信息
冷月葬花魂 · 603浏览 · 2020-03-05 16:25:02
Android UI动画 仿直播点赞飘心动画效果
相关信息
冷月葬花魂 · 1221浏览 · 2019-12-04 16:59:22
Android百种动画效果定制的侧滑菜单库
相关信息
kenrry1992 · 780浏览 · 2019-11-19 14:35:52
Android 2048游戏水波纹动画源码
相关信息
kenrry1992 · 603浏览 · 2019-09-29 14:40:41
安卓FallingView可以实现碎片飘落效果的控件源码
相关信息
kenrry1992 · 615浏览 · 2019-09-26 16:05:03
一个炫酷的相册动画合集 安卓源码
相关信息
冷月葬花魂 · 1448浏览 · 2019-09-06 15:17:28
Android 仿人人网下拉刷新的加载动画
相关信息
kenrry1992 · 831浏览 · 2019-09-06 14:47:46
分类专栏
最新发布
源码排行榜
0评论