# loading-library-ohos **Repository Path**: talkwebyunchaung/loading-library-ohos ## Basic Information - **Project Name**: loading-library-ohos - **Description**: 鸿蒙加载效果组件库(移植和扩展了部分Android的加载组件,以及根据部分网页的加载效果开发实现) - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 18 - **Forks**: 1 - **Created**: 2021-06-09 - **Last Updated**: 2023-12-28 ## Categories & Tags **Categories**: harmonyos-toolkit **Tags**: None ## README # 鸿蒙加载库 本项目是基于github部分开源项目进行鸿蒙化的移植和开发的, 可以通过以下地址: [CoolAndroidAnim组件](https://github.com/TomWithJerry/CoolAndroidAnim) [AdhesiveLoadingView组件](https://github.com/yxping/AdhesiveLoadingView) [SlackLoadingView组件](https://github.com/JeasonWong/SlackLoadingView) [LoadingDrawable组件](https://gitee.com/hihopeorg/LoadingDrawable) [GoogleProgressBar](https://github.com/jpardogo/GoogleProgressBar) 追踪到原安卓项目版本 #### 介绍 harmony-loading-library是鸿蒙加载动画效果库,是鸿蒙的加载组件移植与功能扩展,基于Android平台上的一些常见的组件库以及部分酷炫加载特效的的移植、扩展和重构设计 同时在该基础上还搜集了部分效果图进行功能实现。 #### 效果图 ![效果图1](loading-ohos-run.gif) | CLASS | PREVIEW | | ---------------------------- | ------------------------------------------------------------ | | BallSwingElement | ![](preview/1-1.jpg) | | CubeGridElement | ![](preview/1-2.jpg) | | BallFadingElement | ![](preview/1-3.jpg) | | DoubleCircleElement | ![](preview/1-4.jpg) | | RingGradientElement | ![](preview/2-1.jpg) | | CircularRingElement | ![](preview/2-2.jpg) | | WifiLoadingElement | ![](preview/2-3.jpg) | | BallJumpElement | ![](preview/2-4.jpg) | | EatBeansElement | ![](preview/3-1.jpg) | | DotLoadingElement | ![](preview/3-2.jpg) | | BallBeatElement | ![](preview/3-3.jpg) | | BallDancerElement | ![](preview/3-4.jpg) | | BallExchangeElement | ![](preview/4-1.jpg) | | ChromeFloatingCirclesElement | ![](preview/4-2.jpg) | | ChrysantheElement | ![](preview/4-3.jpg) | | FoldingCirclesElement | ![](preview/4-4.jpg) | | LineScaleElement | ![](preview/5-1.jpg) | | LocatingLoadingElement | ![](preview/5-2.jpg) | | MagnifyElement | ![](preview/5-3.jpg) | | OverWatchElement | ![](preview/5-4.jpg) | | StripLoadingElement | ![](preview/6-1.jpg) | | WhorArcLoadingElement | ![](preview/6-2.jpg) | | SandClockElement | ![](preview/6-3.jpg) | | GearElement | ![](preview/6-4.jpg) | ![效果图2](loading-ohos-run-2.gif) | CLASS | PREVIEW | | --------------------- | --------------------- | | SlackLoadingElement | ![](preview/s1-1.jpg) | | TitanicLoadingElement | ![](preview/s1-3.jpg) | | CatLoadingElement | ![](preview/s1-2.jpg) | | CoolLoadingElement | ![](preview/s1-4.jpg) | | ElectricFanElement | ![](preview/s1-5.jpg) | #### 软件架构 软件架构说明 #### 安装教程 1. 在工程的build.gradle文件中添加 ``` allprojects { repositories { ... maven { url 'https://jitpack.io' } } } ``` 2. 在model的build.gradle中添加 ``` dependencies { implementation 'com.gitee.talkwebyunchaung:loading-library-ohos' } ``` #### 使用说明 1. 创建FactoryComponent ```java FactoryComponent ballSwingComponent = new FactoryComponent(this); ``` 2. 创建对应build构建者对象 ```java BallSwingElement.BallSwingBuilder builder = new BallSwingElement.BallSwingBuilder(ballSwing); ``` 3. 通过构建者对象配置组件参数 ```java builder.setBallCount(10); .... ``` 4. 通过构建者对象生成Element实例 ```java BallSwingElement element = builder.build(); ``` 5. 通过config()给FactoryComponent配置Element ```java ballSwingComponent.config(element); ``` 6. 把FactoryComponent添加到布局 ```java DependentLayout myLayout = new DependentLayout(this); myLayout.addComponent(ballSwingComponent); ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)