# MeiWidgetView
**Repository Path**: chinasoft5_ohos/MeiWidgetView
## Basic Information
- **Project Name**: MeiWidgetView
- **Description**: 一款汇总了郭霖,鸿洋,以及自己平时收集的自定义控件的集合库。主旨帮助大家学习自定义控件中的一些技巧,分析问题解决问题的一种思路。
项目移植状态:主功能完成
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: https://gitee.com/chinasoft5_ohos/MeiWidgetView
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2021-07-28
- **Last Updated**: 2021-09-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## MeiWidgetView
## 项目介绍
- 项目名称:MeiWidgetView
- 所属系列:openharmony的第三方组件适配移植
- 功能简介:一款汇总了郭霖,鸿洋,以及自己平时收集的自定义控件的集合库。主旨帮助大家学习自定义控件中的一些技巧,分析问题解决问题的一种思路。
- 项目移植状态:主功能完成
- 调用差异:有(未实现功能:自定义LayoutManager、扩散圆主题切换)
- 开发版本:sdk6,DevEco Studio2.2 Beta1
- 基线版本:Release v0.1.6
## 效果演示

## 安装教程
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:MeiWidgetView:1.0.1')
......
}
```
在sdk6,DevEco Studio2.2 Beta1下项目可直接运行
如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件,
并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下
## 使用说明
### 1、文字路径
#### a、xml布局
````
````
#### b、属性
- text: 路径文字
- textSize: 路径文字大小
- textColor: 路径文字颜色
- duration: 路径绘制时长
- strokeWidth: 文字的描边宽度
- cycle: 是否循环绘制
autoStart: 是否自动开始播放
### 2、弹跳小球
#### a、xml布局
````
````
#### b、属性
- bounce_count :小球弹跳次数
- ball_color:小球颜色
- ball_count:小球数量
- ball_radius:小球半径
- ball_delay:小球出现时间间隔(当小球数大于1时)
- anim_duration:小球一次动画时长
- physic_mode : 开启物理效果(下落加速上升减速)
- random_color: 开启小球颜色随机
- random_radius: 开启小球大小随机(在基础大小上下浮动)
- random_path: 开启小球路径随机(在基础路径坐标上下浮动)
### 3、酷炫的路径
#### a、xml布局
````
````
#### b、相关方法
````
//设置路径
public void setPath(Path path) {
pathView.setPath(path);
}
````
### 4、MEI-直播间送爱心
#### a、xml布局
````
````
#### b、属性
- heartDuration: 爱心动画时长
- heartEnableAlpha: 是否显示透明度动画
- heartEnableScale: 是否显示缩放动画
### 5、仿膜拜单车贴纸效果
基于[jbox2d](https://github.com/jbox2d/jbox2d)引擎实现 , 文中有相应的代码注释请查阅
#### a、xml布局
````
````
### 6、LOVE玫瑰
#### a、xml布局
````
````
#### b、开始动画
````
mRoseGiftSurfaceView.startAnimation();
````
### 7、浮动粒子
通过三阶贝塞尔曲线,绘制每个粒子的运动轨迹
#### a、xml布局
````
````
#### b、属性
- firefly_num: 浮点粒子数量 默认400
- firefly_max_radius: 浮点粒子的最大半径 默认5
- firefly_move_rate: 浮点粒子的移动速率 默认5 越大移动越慢
### 8、直播间点赞控件
贝塞尔曲线来计算点赞小图标的位置
#### a、相关代码
````
// 初始化
mPraiseAnimator = new BezierPraiseAnimator(this);
// 开始动画
mPraiseAnimator.startAnimation(mIvPraise);
````
## 测试信息
```
CodeCheck代码测试无异常
CloudTest代码测试无异常
病毒安全检测通过
当前版本demo功能与原组件基本无差异
```
## 版本迭代
- 1.0.1
- 1.0.0
- 0.0.1-SNAPSHOT
## 版权和许可信息
````
Copyright 2018 文淑
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
````