# WaveLoadingView **Repository Path**: chentaoai/WaveLoadingView ## Basic Information - **Project Name**: WaveLoadingView - **Description**: 一个提供实时波纹加载特效的控件 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-04-13 - **Last Updated**: 2024-12-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WaveLoadingView **本项目基于开源项目 `WaveLoadingView` 进行鸿蒙化的移植和开发,可以通过项目标签以及github地址( https://github.com/tangqi92/WaveLoadingView )追踪到原安卓项目版本** #### 项目介绍 - 项目名称:WaveLoadingView - 所属系列:鸿蒙第三方组件适配移植 - 功能:一个提供实时波纹加载特效的控件 - 基线版本:WaveLoadingView release v1.1.7 - 项目移植状态:主功能完成 - 调用差异:无 - 开发版本:sdk5,DevEco Studio2.1 beta3 - 项目作者和维护人:陈滔 - 联系方式:chentao074@chinasoftinc.com #### 效果演示 ![WaveLoadingView](/screenshots/WaveLoadingView.gif) #### 安装教程 1.下载library的har包library.har(位于:)。 2.启动 DevEco Studio,将下载的har包,导入工程目录“demo->libs”下。 3.在moudle级别下的build.gradle文件中添加依赖,在dependencies标签中增加对libs目录下jar包的引用。 ``` dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) ...... } ``` 在sdk5,DevEco Studio2.1 beta3下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下 #### 使用说明 将 WaveLoadingView 添加到layout 中,可以像下面这样自定义属性 ```xml ``` 可以在源码中动态设置属性 ```java WaveLoadingView mWaveLoadingView = (WaveLoadingView) findViewById(R.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功能与安卓原组件基本无差异 测试员:卢艳龙 #### 版本迭代 - v0.0.1_alpha #### 版权和许可信息 Copyright 2016 7heaven 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.