File tree Expand file tree Collapse file tree
library/src/main/res/layout
sample/src/main/java/com/f1reking/statuslayout Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# StatusLayout
22[ ![ ] ( https://www.jitpack.io/v/F1ReKing/StatusLayout.svg )] ( https://www.jitpack.io/#F1ReKing/StatusLayout )
33
4- 一个在Android上可切换状态的布局
4+ 一个在Android上可切换数据状态的布局,包含了加载布局,空数据布局,错误布局
55
66## 预览图
7+ <a href =" res/statusLayout.gif " ><img src =" res/statusLayout.gif " width =" 30% " /></a >
78
89
910## 引入
11+
1012#### Step 1. Add the JitPack repository to your build file
13+
1114```
1215allprojects {
1316 repositories {
Original file line number Diff line number Diff line change 1- # Project-wide Gradle settings.
2-
3- # IDE (e.g. Android Studio) users:
4- # Gradle settings configured through the IDE *will override*
5- # any settings specified in this file.
6-
1+ # # Project-wide Gradle settings.
2+ #
73# For more details on how to configure your build environment visit
84# http://www.gradle.org/docs/current/userguide/build_environment.html
9-
5+ #
106# Specifies the JVM arguments used for the daemon process.
117# The setting is particularly useful for tweaking memory settings.
12- org.gradle.jvmargs =-Xmx1536m
13-
8+ # Default value: -Xmx1024m -XX:MaxPermSize=256m
9+ # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10+ #
1411# When configured, Gradle will run in incubating parallel mode.
1512# This option should only be used with decoupled projects. More details, visit
1613# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1714# org.gradle.parallel=true
15+ # Sat Feb 03 09:55:58 CST 2018
16+ systemProp.http.proxyHost =127.0.0.1
17+ org.gradle.jvmargs =-Xmx1536m
18+ systemProp.http.proxyPort =1080
Original file line number Diff line number Diff line change 88 >
99
1010 <ProgressBar
11- android : layout_width =" match_parent "
11+ android : layout_width =" wrap_content "
1212 android : layout_height =" wrap_content"
1313 />
1414
Original file line number Diff line number Diff line change @@ -30,20 +30,19 @@ class MainActivity : AppCompatActivity() {
3030 .setErrorClickText(" 重新加载..." )
3131 .setEmptyImg(R .drawable.ic_empty_sample)
3232 .setErrorImg(R .drawable.ic_error_sample)
33+ .setLoadingTextColor(R .color.material_blue_grey_900)
3334 .setErrorTextColor(R .color.material_blue_grey_900)
3435 .setErrorClickTextColor(R .color.material_blue_grey_900)
3536 .setEmptyTextColor(R .color.material_blue_grey_900)
3637 .setEmptyClickTextColor(R .color.material_blue_grey_900)
3738 .setStatusClickListener(object : StatusClickListener {
3839 override fun onEmptyClick (view : View ) {
39- println (" 数据空" )
40- Toast .makeText(this @MainActivity, " 数据空" , Toast .LENGTH_SHORT )
40+ Toast .makeText(this @MainActivity, " 点击了数据空" , Toast .LENGTH_SHORT )
4141 .show()
4242 }
4343
4444 override fun onErrorClick (view : View ) {
45- println (" 错误" )
46- Toast .makeText(this @MainActivity, " 错误" , Toast .LENGTH_SHORT )
45+ Toast .makeText(this @MainActivity, " 点击了错误" , Toast .LENGTH_SHORT )
4746 .show()
4847 }
4948 })
You can’t perform that action at this time.
0 commit comments