Skip to content

Commit

Permalink
Sample && Fix bug
Browse files Browse the repository at this point in the history
Add Sample and Fix add LoadingView bug
  • Loading branch information
Syehunter committed Jan 11, 2016
1 parent d635726 commit ce41d16
Show file tree
Hide file tree
Showing 17 changed files with 422 additions and 83 deletions.
Binary file modified .gradle/2.8/taskArtifacts/cache.properties.lock
Binary file not shown.
Binary file modified .gradle/2.8/taskArtifacts/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/2.8/taskArtifacts/fileSnapshots.bin
Binary file not shown.
Binary file modified .gradle/2.8/taskArtifacts/outputFileStates.bin
Binary file not shown.
Binary file modified .gradle/2.8/taskArtifacts/taskArtifacts.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

354 changes: 334 additions & 20 deletions .idea/workspace.xml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,28 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name=".AppApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
28 changes: 28 additions & 0 deletions app/src/main/java/z/sye/space/loadingview/AppApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* @(#) z.sye.space.loadingview 2016/1/11;
* <p/>
* Copyright (c), 2009 深圳孔方兄金融信息服务有限公司(Shenzhen kfxiong
* Financial Information Service Co. Ltd.)
* <p/>
* 著作权人保留一切权利,任何使用需经授权。
*/
package z.sye.space.loadingview;

import android.app.Application;

import z.sye.space.library.PageStateLayout;

/**
* Created by Syehunter on 2016/1/11.
*/
public class AppApplication extends Application {

@Override
public void onCreate() {
super.onCreate();

// PageStateLayout.Builder.setLoadingView(R.layout.custom_layout_loading)
// .setEmptyView(R.layout.custom_layout_empty)
// .setErrorView(R.layout.custom_layout_error);
}
}
13 changes: 13 additions & 0 deletions app/src/main/res/layout/custom_layout_empty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_centerInParent="true"
android:text="This is custom EmptyView"
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

</RelativeLayout>
13 changes: 13 additions & 0 deletions app/src/main/res/layout/custom_layout_error.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_centerInParent="true"
android:text="This is custom ErrorView"
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

</RelativeLayout>
13 changes: 13 additions & 0 deletions app/src/main/res/layout/custom_layout_loading.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_centerInParent="true"
android:text="This is custom LoaidngView"
android:textSize="20sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

</RelativeLayout>
60 changes: 1 addition & 59 deletions build/intermediates/dex-cache/cache.xml
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<items version="2" >
<items version="2" />

<item
jar="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars/classes.jar"
jumboMode="false"
revision="23.0.2"
sha1="09c5e804bc67fc0580360043dff067df574a60d4">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/com.android.support-recyclerview-v7-23.1.1_35a8144509fd25e735b67134b6894f481ad31299.jar" />
</item>
<item
jar="/Users/Syehunter/Documents/android-sdk-macosx/extras/android/m2repository/com/android/support/support-annotations/23.1.1/support-annotations-23.1.1.jar"
jumboMode="false"
revision="23.0.2"
sha1="8d680ba5a623724d1fb0e81c36a790f023a6cede">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/support-annotations-23.1.1_a4ab71d6cbb34d883d6f16f1446239bc9ee7be59.jar" />
</item>
<item
jar="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/incremental-runtime-classes/debug/instant-run.jar"
jumboMode="false"
revision="23.0.2"
sha1="cadc2d7c5735f6514c96884696de824eea071b6f">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/instant-run_ad8880dba455417ec3dedb5289b571af958e6c98.jar" />
</item>
<item
jar="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/classes.jar"
jumboMode="false"
revision="23.0.2"
sha1="6cbc7773921fcfedbe55657578f0cbfe614778dc">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/com.android.support-support-v4-23.1.1_d9564b26e0bedbe72673984f4e7de20c1f1fe004.jar" />
</item>
<item
jar="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/incremental-classes/debug/classes.jar"
jumboMode="false"
revision="23.0.2"
sha1="3407ee7d7114b72d233f0e28f2a4bcd0f6ec7e89">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/classes_af4ecd369d862d54281bfea80b112c22847288eb.jar" />
</item>
<item
jar="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars/classes.jar"
jumboMode="false"
revision="23.0.2"
sha1="5c5699834e9722f1c288fea2de82725d078ba127">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/com.android.support-appcompat-v7-23.1.1_97b17508755d98709b6a44ee5552ffc78efd246d.jar" />
</item>
<item
jar="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/libs/internal_impl-23.1.1.jar"
jumboMode="false"
revision="23.0.2"
sha1="a4de9c81ae239414e1ed0f86441b02abaf29bca9">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/internal_impl-23.1.1_88d5162b84e79329b05ff78e02338ba8607be49a.jar" />
</item>
<item
jar="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars/classes.jar"
jumboMode="false"
revision="23.0.2"
sha1="379471b2bd17d9737c050345c08e8c7d16589784">
<dex dex="/Users/Syehunter/Documents/github/PageStateLayout/app/build/intermediates/pre-dexed/debug/com.android.support-design-23.1.1_fab3b7883f66095b1debd567fc5f42a89630fcf0.jar" />
</item>

</items>
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 2
versionName "0.1.1"
versionCode 3
versionName "0.1.2"
}
buildTypes {
release {
Expand Down
1 change: 1 addition & 0 deletions library/library.iml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ private void show(PageState state) {
mLoadingView = getLoadingView();
addView(mLoadingView);
} else {
mLoading.reset();
if (mLoading instanceof MaterialProgress) {
mLoading.reset();
}
}

if (null == mErrorView) {
Expand Down

0 comments on commit ce41d16

Please sign in to comment.