# WaveLoadingView **Repository Path**: chinasoft_ohos/WaveLoadingView ## Basic Information - **Project Name**: WaveLoadingView - **Description**: 一个提供实时波纹加载特效的控件 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-04-13 - **Last Updated**: 2024-05-30 ## Categories & Tags **Categories**: harmonyos-animate **Tags**: None ## README # WaveLoadingView #### 项目介绍 - 项目名称:WaveLoadingView - 所属系列:openharmony 第三方组件适配移植 - 功能:一个提供实时波纹加载特效的控件 - 项目移植状态:主功能完成 - 调用差异:无 - 开发版本:sdk5,DevEco Studio2.1 beta3 - 基线版本:Release v0.3.5 #### 效果演示 ![WaveLoadingView](/screenshots/WaveLoadingView.gif) #### 安装教程 在moudle级别下的build.gradle文件中添加依赖 ``` // 添加maven仓库 repositories { maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' } } // 添加依赖库 dependencies { implementation 'com.gitee.chinasoft_ohos:WaveLoadingView:1.0.1' } ``` 在sdk5,DevEco Studio2.1 beta3下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下 #### 使用说明 将 WaveLoadingView 添加到layout 中,可以像下面这样自定义属性 ```xml ``` 可以在源码中动态设置属性 ```java WaveLoadingView mWaveLoadingView = (WaveLoadingView) findComponentById(ResourceTable.Id_waveloadingview); mWaveLoadingView.setShapeType(WaveLoadingView.ShapeType.CIRCLE); mWaveLoadingView.setTopTitle("Top Title"); mWaveLoadingView.setCenterTitleColor(Color.GRAY); mWaveLoadingView.setBottomTitleSize(18); mWaveLoadingView.setProgressValue(80); mWaveLoadingView.setBorderWidth(10); mWaveLoadingView.setAmplitudeRatio(60); mWaveLoadingView.setWaveColor(Color.GRAY); mWaveLoadingView.setBorderColor(Color.GRAY); mWaveLoadingView.setTopTitleStrokeColor(Color.BLUE); mWaveLoadingView.setTopTitleStrokeWidth(3); mWaveLoadingView.setAnimDuration(3000); mWaveLoadingView.pauseAnimation(); mWaveLoadingView.resumeAnimation(); mWaveLoadingView.cancelAnimation(); mWaveLoadingView.startAnimation(); ``` 所有可以设置的属性,见下表: |name|format|description| |:---:|:---:|:---:| | wlv_borderWidth | dimension |Border width, default is 0 | wlv_borderColor | color | Border color | wlv_progressValue | integer | Pprogress value, default is 50 | wlv_shapeType | enum | Shape type, default is circle | wlv_triangle_direction | enum | Triangle direction, default is north | wlv_round_rectangle | boolean | Is round rectangle, default is false | wlv_round_rectangle_x_and_y | integer | Round Rectangle corners, default is 30 | wlv_waveColor | color | Wave color | wlv_wave_background_Color | color | Wave background color | wlv_waveAmplitude | float | Wave amplitude | wlv_titleTop | string | Top title content, default is null | wlv_titleCenter | string | Center title content, default is null | wlv_titleBottom | string | Bottom title content, default is null | wlv_titleTopSize | dimension | Top title size, default is 18 | wlv_titleCenterSize | dimension | Center title size, default is 22 | wlv_titleBottomSize | dimension | Bottom size, default is 18 | wlv_titleTopColor | color | Top title color | wlv_titleCenterColor | color | Center title color | wlv_titleBottomColor | color | Bottom title color | wlv_titleTopStrokeColor | color | Top title stroke color | wlv_titleCenterStrokeColor | color | Center title stroke color | wlv_titleBottomStrokeColor | color | Bottom title stroke color | wlv_titleTopStrokeWidth | dimension | Top title stroke width | wlv_titleCenterStrokeWidth | dimension | Center title stroke width | wlv_titleBottomStrokeWidth | dimension | Bottom title stroke width **所有属性都可以通过各自的getter和setter在运行时更改它们。** #### 测试信息 CodeCheck代码测试无异常 CloudTest代码测试无异常 火绒安全病毒安全检测通过 当前版本demo功能与原组件基本无差异 #### 版本迭代 - 1.0.1 #### 版权和许可信息 Copyright 2016 Qi Tang 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.