diff --git a/README.md b/README.md
index 4b874a8..afbbb80 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,16 @@
# StatusLayout
[![](https://www.jitpack.io/v/F1ReKing/StatusLayout.svg)](https://www.jitpack.io/#F1ReKing/StatusLayout)
-一个在Android上可切换状态的布局
+一个在Android上可切换数据状态的布局,包含了加载布局,空数据布局,错误布局
## 预览图
+
## 引入
+
#### Step 1. Add the JitPack repository to your build file
+
```
allprojects {
repositories {
diff --git a/gradle.properties b/gradle.properties
index aac7c9b..eef3f13 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,17 +1,18 @@
-# Project-wide Gradle settings.
-
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-
+## Project-wide Gradle settings.
+#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
-
+#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
-
+# Default value: -Xmx1024m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
+#Sat Feb 03 09:55:58 CST 2018
+systemProp.http.proxyHost=127.0.0.1
+org.gradle.jvmargs=-Xmx1536m
+systemProp.http.proxyPort=1080
diff --git a/library/src/main/res/layout/layout_loading.xml b/library/src/main/res/layout/layout_loading.xml
index bc0ecb9..6b8b1d9 100644
--- a/library/src/main/res/layout/layout_loading.xml
+++ b/library/src/main/res/layout/layout_loading.xml
@@ -8,7 +8,7 @@
>
diff --git a/res/statusLayout.gif b/res/statusLayout.gif
new file mode 100644
index 0000000..a30ee3a
Binary files /dev/null and b/res/statusLayout.gif differ
diff --git a/sample/src/main/java/com/f1reking/statuslayout/MainActivity.kt b/sample/src/main/java/com/f1reking/statuslayout/MainActivity.kt
index 72a7354..d953870 100644
--- a/sample/src/main/java/com/f1reking/statuslayout/MainActivity.kt
+++ b/sample/src/main/java/com/f1reking/statuslayout/MainActivity.kt
@@ -30,20 +30,19 @@ class MainActivity : AppCompatActivity() {
.setErrorClickText("重新加载...")
.setEmptyImg(R.drawable.ic_empty_sample)
.setErrorImg(R.drawable.ic_error_sample)
+ .setLoadingTextColor(R.color.material_blue_grey_900)
.setErrorTextColor(R.color.material_blue_grey_900)
.setErrorClickTextColor(R.color.material_blue_grey_900)
.setEmptyTextColor(R.color.material_blue_grey_900)
.setEmptyClickTextColor(R.color.material_blue_grey_900)
.setStatusClickListener(object : StatusClickListener {
override fun onEmptyClick(view: View) {
- println("数据空")
- Toast.makeText(this@MainActivity, "数据空", Toast.LENGTH_SHORT)
+ Toast.makeText(this@MainActivity, "点击了数据空", Toast.LENGTH_SHORT)
.show()
}
override fun onErrorClick(view: View) {
- println("错误")
- Toast.makeText(this@MainActivity, "错误", Toast.LENGTH_SHORT)
+ Toast.makeText(this@MainActivity, "点击了错误", Toast.LENGTH_SHORT)
.show()
}
})