├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── no_datas.png │ │ │ │ ├── ic_launcher.png │ │ │ │ └── no_network.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ └── menu_main.xml │ │ │ └── layout │ │ │ │ ├── custom_layout_empty.xml │ │ │ │ ├── custom_layout_error.xml │ │ │ │ ├── custom_layout_loading.xml │ │ │ │ ├── content_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ └── layout_succeed.xml │ │ ├── java │ │ │ └── z │ │ │ │ └── sye │ │ │ │ └── space │ │ │ │ └── loadingview │ │ │ │ ├── AppApplication.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── z │ │ │ └── sye │ │ │ └── space │ │ │ └── loadingview │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── z │ │ └── sye │ │ └── space │ │ └── loadingview │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── app.iml ├── library ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── no_datas.png │ │ │ │ └── no_network.png │ │ │ ├── values-zh │ │ │ │ └── strings.xml │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ └── attrs.xml │ │ │ ├── values-en │ │ │ │ └── strings.xml │ │ │ └── layout │ │ │ │ ├── loading.xml │ │ │ │ ├── empty.xml │ │ │ │ └── error.xml │ │ ├── java │ │ │ └── z │ │ │ │ └── sye │ │ │ │ └── space │ │ │ │ └── library │ │ │ │ ├── utils │ │ │ │ ├── PageState.java │ │ │ │ └── DimenUtils.java │ │ │ │ ├── PageStateListener.java │ │ │ │ ├── widget │ │ │ │ ├── MaterialProgress.java │ │ │ │ └── RippleView.java │ │ │ │ └── PageStateLayout.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── z │ │ │ └── sye │ │ │ └── space │ │ │ └── loadingviewlibrary │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── z │ │ └── sye │ │ └── space │ │ └── loadingviewlibrary │ │ └── ApplicationTest.java ├── build.gradle ├── proguard-rules.pro └── library.iml ├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── inspectionProfiles │ ├── profiles_settings.xml │ └── Project_Default.xml ├── modules.xml ├── libraries │ ├── junit_4_12.xml │ ├── hamcrest_core_1_3.xml │ ├── support_annotations_23_1_1.xml │ ├── design_23_1_1.xml │ ├── recyclerview_v7_23_1_1.xml │ ├── appcompat_v7_23_1_1.xml │ └── support_v4_23_1_1.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml └── misc.xml ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── LoadingView.iml ├── PageStateLayout.iml ├── LICENSE ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | MaterialPageStateLayout -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/no_datas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/app/src/main/res/mipmap-hdpi/no_datas.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/no_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/app/src/main/res/mipmap-hdpi/no_network.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/res/mipmap-hdpi/no_datas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/library/src/main/res/mipmap-hdpi/no_datas.png -------------------------------------------------------------------------------- /library/src/main/res/mipmap-hdpi/no_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Syehunter/MaterialPageStateLayout/HEAD/library/src/main/res/mipmap-hdpi/no_network.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LoadingView 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/res/values-zh/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 暂无记录! 4 | 网络连接失败,点击刷新! 5 | -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LoadingViewLibrary 3 | 暂无记录! 4 | 网络连接失败,点击刷新! 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/res/values-en/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | No Records! 4 | Network connection Failed!\nClick to Refresh 5 | -------------------------------------------------------------------------------- /library/src/main/java/z/sye/space/library/utils/PageState.java: -------------------------------------------------------------------------------- 1 | package z.sye.space.library.utils; 2 | 3 | /** 4 | * Created by Syehunter on 16/1/9. 5 | */ 6 | public enum PageState { 7 | 8 | LOADING, EMPTY, ERROR, SUCCEED, REQEUSTING 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 21 11:34:03 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/layout/loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /library/src/main/java/z/sye/space/library/PageStateListener.java: -------------------------------------------------------------------------------- 1 | package z.sye.space.library; 2 | 3 | /** 4 | * Created by Syehunter on 16/1/9. 5 | */ 6 | public interface PageStateListener { 7 | 8 | void onLoading(); 9 | 10 | void onError(); 11 | 12 | void onEmpty(); 13 | 14 | void onSucceed(); 15 | 16 | void onRequesting(); 17 | } 18 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | /*/build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | -------------------------------------------------------------------------------- /app/src/test/java/z/sye/space/loadingview/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package z.sye.space.loadingview; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /library/src/main/java/z/sye/space/library/utils/DimenUtils.java: -------------------------------------------------------------------------------- 1 | package z.sye.space.library.utils; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * Created by Syehunter on 16/1/9. 7 | */ 8 | public class DimenUtils { 9 | 10 | public static int dip2px(Context context, int dp) { 11 | float density = context.getResources().getDisplayMetrics().density; 12 | return (int) (dp * density + 0.5f); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /library/src/test/java/z/sye/space/loadingviewlibrary/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package z.sye.space.loadingviewlibrary; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/z/sye/space/loadingview/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package z.sye.space.loadingview; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /library/src/androidTest/java/z/sye/space/loadingviewlibrary/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package z.sye.space.loadingviewlibrary; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_layout_empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_layout_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_layout_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 15 9 | targetSdkVersion 23 10 | versionCode 5 11 | versionName "0.1.2.2" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | testCompile 'junit:junit:4.12' 24 | compile 'com.android.support:appcompat-v7:23.1.1' 25 | } 26 | -------------------------------------------------------------------------------- /.idea/libraries/support_annotations_23_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Syehunter/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/Syehunter/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |