# ProgressLayout
**Repository Path**: mirrors_donglua/ProgressLayout
## Basic Information
- **Project Name**: ProgressLayout
- **Description**: A simple Android library about progress layout
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2026-02-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#ProgressLayout
[](https://jitpack.io/#LianjiaTech/ProgressLayout)
[](http://www.methodscount.com/?lib=com.github.LianjiaTech%3AProgressLayout%3A1.1.0)
[](http://www.methodscount.com/?lib=com.github.LianjiaTech%3AProgressLayout%3A1.1.0)
[](https://github.com/SmartDengg/ProgressLayout/stargazers)
[](https://github.com/SmartDengg/ProgressLayout/network)
[](https://github.com/SmartDengg/ProgressLayout/issues)
[](LICENSE.txt)

介绍
--------
一个轻量的ProgressLayout,能够帮助你实现“加载中”、“无内容”,“网络错误”,“加载失败”等不同场景下的页面切换与展示,并且支持点击页面重试。
用法
--------
首先,在项目根目录下的`build.gradle`中添加如下代码:
```java
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
其次,在module的`build.gradle`中添加[最新版本库](https://github.com/LianjiaTech/ProgressLayout/releases)的依赖:
```java
dependencies {
compile 'com.github.LianjiaTech:ProgressLayout:x.y.z'
}
```
可以通过下几种属性来指定不同情况需要展现的layout:
```xml
```
**在Xml中设置**
```xml
......
```
**在Theme中设置**
如果不同的Activity需要对应不同的页面,也可以通过在Theme中指定`progressLayoutDefStyle`的方式来设置需要的Layout:
```xml
```
**函数使用**
通过调用不同的方法,来展示对应的页面,如`.showLoading();`、`.showContent()`等。或者为“错误页面”添加点击重试事件:
```java
progressLayout.showNetError(new View.OnClickListener() {
@Override
public void onClick(View v) {
/*重试逻辑*/
}
});
```
GIF
--------

Developed By
--------
- 小鄧子 - dengwei@lianjia.com
License
--------
Copyright 2016 LianjiaTech, Inc.
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.