# ohos-shapeLoadingView
**Repository Path**: HarmonyOS-tpc/ohos-shapeLoadingView
## Basic Information
- **Project Name**: ohos-shapeLoadingView
- **Description**: 一个高仿新版58加载动画控件
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 7
- **Forks**: 1
- **Created**: 2021-04-15
- **Last Updated**: 2024-09-26
## Categories & Tags
**Categories**: harmonyos-loading
**Tags**: None
## README
## 描述
	一个高仿新版58加载动画控件
## 截图
 ## 集成
```
allprojects{
    repositories{
        mavenCentral()
    }
}
implementation 'io.openharmony.tpc.thirdlib:ohos-shapeLoadingView:1.0.2'
```
## 用法
1. 在xml中使用LoadingView
	```html	
		
	```
2. 在java中使用ShapeLoadingDialog
- 初始化
```java
		ShapeLoadingDialog shapeLoadingDialog = new ShapeLoadingDialog.Builder(this)
                        .loadText("加载中...") // 设置加载中的文本
                        .cancelable(false) // 当用户点击返回键时是否消失Dialog
                        .canceledOnTouchOutside(true) // 当用户点击Dialog外部时是否消失Dialog
                        .build();
        shapeLoadingDialog.show(); // 显示Dialog
```
## LoadingView的xml属性
| name             |  format   | description   | default_value |
| :---------------:| :------:  | :-----------: | :-----------: |
| loadingText      | String    | 加载中文本      | ""            |
| loadingTextColor | Color     | 加载中文本颜色   | #757575       |
| loadingTextSize  | dimension | 加载中文本大小   | 14fp          |
| delay            | dimension | 动画执行延迟时间 | 80ms          |
## 示例entry运行要求
通过DevEco studio,并下载SDK
将项目中的build.gradle文件中dependencies→classpath版本改为对应的版本(即你的IDE新建项目中所用的版本)
## 集成
```
allprojects{
    repositories{
        mavenCentral()
    }
}
implementation 'io.openharmony.tpc.thirdlib:ohos-shapeLoadingView:1.0.2'
```
## 用法
1. 在xml中使用LoadingView
	```html	
		
	```
2. 在java中使用ShapeLoadingDialog
- 初始化
```java
		ShapeLoadingDialog shapeLoadingDialog = new ShapeLoadingDialog.Builder(this)
                        .loadText("加载中...") // 设置加载中的文本
                        .cancelable(false) // 当用户点击返回键时是否消失Dialog
                        .canceledOnTouchOutside(true) // 当用户点击Dialog外部时是否消失Dialog
                        .build();
        shapeLoadingDialog.show(); // 显示Dialog
```
## LoadingView的xml属性
| name             |  format   | description   | default_value |
| :---------------:| :------:  | :-----------: | :-----------: |
| loadingText      | String    | 加载中文本      | ""            |
| loadingTextColor | Color     | 加载中文本颜色   | #757575       |
| loadingTextSize  | dimension | 加载中文本大小   | 14fp          |
| delay            | dimension | 动画执行延迟时间 | 80ms          |
## 示例entry运行要求
通过DevEco studio,并下载SDK
将项目中的build.gradle文件中dependencies→classpath版本改为对应的版本(即你的IDE新建项目中所用的版本)