2 Star 6 Fork 1

CHINASOFT_OHOS / SuperLike

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

SuperLike

项目介绍

  • 项目名称:SuperLike
  • 所属系列:openharmony的第三方组件适配移植
  • 功能:仿今日头条点赞喷射表情动画。主要用于点赞防抖事件的交互提示,这里只提供交互View 防抖功能可以根据Rx自行实现
  • 项目移植状态:主功能完成
  • 调用差异:无
  • 开发版本:sdk6,DevEco Studio2.2 beta1
  • 基线版本:Release 0.2.1

效果演示

SuperLike

安装教程

1.在项目根目录下的build.gradle文件中,

allprojects {
   repositories {
       maven {
             url 'https://s01.oss.sonatype.org/content/repositories/releases/'
       }
   }
}

2.在entry模块的build.gradle文件中,

dependencies {
   implementation('com.gitee.chinasoft_ohos:SuperLike:1.0.0')
   ......  
}

在sdk6,DevEco Studio2.2 beta1下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下

使用说明

参数含义
自定义属性名字 参数含义
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[]{ResourceTable.Media_emoji_1, ResourceTable.Media_emoji_2, ResourceTable.Media_emoji_3, ResourceTable.Media_emoji_4,
                                                                  ResourceTable.Media_emoji_5, ResourceTable.Media_emoji_6, ResourceTable.Media_emoji_7, ResourceTable.Media_emoji_8,
                                                                  ResourceTable.Media_emoji_9, ResourceTable.Media_emoji_10, ResourceTable.Media_emoji_11, ResourceTable.Media_emoji_12,
                                                                  ResourceTable.Media_emoji_13, ResourceTable.Media_emoji_14, ResourceTable.Media_emoji_15, ResourceTable.Media_emoji_16,
                                                                  ResourceTable.Media_emoji_17, ResourceTable.Media_emoji_18, ResourceTable.Media_emoji_19, ResourceTable.Media_emoji_20})
                        .setLevelDrawableArray(new int[]{ResourceTable.Media_multi_digg_word_level_1, ResourceTable.Media_multi_digg_word_level_2, ResourceTable.Media_multi_digg_word_level_3})
                        .build();
    superLikeLayout.setProvider(provider);
    superLikeLayout.launch(x, y);

测试信息

CodeCheck代码测试无异常

CloudTest代码测试无异常

病毒安全检测通过

当前版本demo功能与原组件基本无差异

版本迭代

  • 1.0.0
  • 0.0.1-SNAPSHOT

版权和许可信息

MIT License

Copyright (c) Qiu800820

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

仿今日头条点赞喷射表情动画 expand collapse
Java and 2 more languages
Cancel

SuperLike

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/chinasoft_ohos/SuperLike.git
git@gitee.com:chinasoft_ohos/SuperLike.git
chinasoft_ohos
SuperLike
SuperLike
master

Search

E71a60c3 8189591 Df7b7c6b 8189591