├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_loading.png │ │ │ │ ├── ic_loading_empty.png │ │ │ │ ├── ic_loading_error.png │ │ │ │ ├── ic_loading_login.png │ │ │ │ └── ic_loading_no_net.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── game_ic_loading_1.webp │ │ │ │ ├── game_ic_loading_10.webp │ │ │ │ ├── game_ic_loading_11.webp │ │ │ │ ├── game_ic_loading_12.webp │ │ │ │ ├── game_ic_loading_13.webp │ │ │ │ ├── game_ic_loading_14.webp │ │ │ │ ├── game_ic_loading_15.webp │ │ │ │ ├── game_ic_loading_16.webp │ │ │ │ ├── game_ic_loading_17.webp │ │ │ │ ├── game_ic_loading_18.webp │ │ │ │ ├── game_ic_loading_19.webp │ │ │ │ ├── game_ic_loading_2.webp │ │ │ │ ├── game_ic_loading_20.webp │ │ │ │ ├── game_ic_loading_21.webp │ │ │ │ ├── game_ic_loading_22.webp │ │ │ │ ├── game_ic_loading_23.webp │ │ │ │ ├── game_ic_loading_24.webp │ │ │ │ ├── game_ic_loading_25.webp │ │ │ │ ├── game_ic_loading_26.webp │ │ │ │ ├── game_ic_loading_27.webp │ │ │ │ ├── game_ic_loading_28.webp │ │ │ │ ├── game_ic_loading_3.webp │ │ │ │ ├── game_ic_loading_30.webp │ │ │ │ ├── game_ic_loading_31.webp │ │ │ │ ├── game_ic_loading_32.webp │ │ │ │ ├── game_ic_loading_33.webp │ │ │ │ ├── game_ic_loading_34.webp │ │ │ │ ├── game_ic_loading_35.webp │ │ │ │ ├── game_ic_loading_36.webp │ │ │ │ ├── game_ic_loading_37.webp │ │ │ │ ├── game_ic_loading_38.webp │ │ │ │ ├── game_ic_loading_4.webp │ │ │ │ ├── game_ic_loading_5.webp │ │ │ │ ├── game_ic_loading_6.webp │ │ │ │ ├── game_ic_loading_7.webp │ │ │ │ ├── game_ic_loading_8.webp │ │ │ │ ├── game_ic_loading_9.webp │ │ │ │ └── page_status_demo_loading.gif │ │ │ ├── layout │ │ │ │ ├── view_custom_loading.xml │ │ │ │ ├── activity_single_page_more_state.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── view_custom_error.xml │ │ │ │ ├── activity_simple.xml │ │ │ │ └── activity_coordinatorlayout.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ ├── game_anim_loading.xml │ │ │ │ └── ic_launcher_background.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── smartcity │ │ │ └── commonbase │ │ │ └── widget │ │ │ └── pagestatus │ │ │ └── test │ │ │ ├── FaceLoadingView.java │ │ │ ├── CoordinatorLayoutActivity.java │ │ │ ├── LoadingGifView.java │ │ │ ├── MainActivity.java │ │ │ ├── SinglePageMoreStateActivity.java │ │ │ ├── SimpleActivity.java │ │ │ └── Custom1Activity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── smartcity │ │ │ └── commonbase │ │ │ └── widget │ │ │ └── pagestatus │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── smartcity │ │ └── commonbase │ │ └── widget │ │ └── pagestatus │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── pagestatushelper ├── .gitignore ├── src │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── smartcity │ │ │ └── commonbase │ │ │ └── widget │ │ │ └── pagestatus │ │ │ ├── OnEmptyClickListener.java │ │ │ ├── OnErrorClickListener.java │ │ │ ├── OnNoLoginClickListener.java │ │ │ ├── imp │ │ │ ├── FrameLayoutViewStatusImp.java │ │ │ ├── ViewStatusInterface.java │ │ │ ├── RelativeLayoutViewStatusImp.java │ │ │ ├── LinearLayoutViewStatusImp.java │ │ │ ├── ViewGroupViewStatusImp.java │ │ │ └── ConstraintLayoutViewStatusImp.java │ │ │ ├── LayoutParams.java │ │ │ ├── ViewStatusController.java │ │ │ ├── ColorUtils.java │ │ │ ├── ViewUtils.java │ │ │ ├── PageStatusHelper.java │ │ │ └── Builder.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── smartcity │ │ │ └── commonbase │ │ │ └── widget │ │ │ └── pagestatus │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── smartcity │ │ └── commonbase │ │ └── widget │ │ └── pagestatus │ │ └── ExampleInstrumentedTest.java ├── push.gradle ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gif ├── simple1.gif ├── simple2.gif ├── simple3.gif └── simple4.gif ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── .gitignore ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /pagestatushelper/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':pagestatushelper' -------------------------------------------------------------------------------- /gif/simple1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/gif/simple1.gif -------------------------------------------------------------------------------- /gif/simple2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/gif/simple2.gif -------------------------------------------------------------------------------- /gif/simple3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/gif/simple3.gif -------------------------------------------------------------------------------- /gif/simple4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/gif/simple4.gif -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PageStatusHelper 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xhdpi/ic_loading.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xhdpi/ic_loading_empty.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xhdpi/ic_loading_error.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xhdpi/ic_loading_login.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_loading_no_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xhdpi/ic_loading_no_net.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_1.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_10.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_10.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_11.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_11.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_12.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_12.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_13.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_13.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_14.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_14.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_15.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_15.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_16.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_16.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_17.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_17.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_18.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_18.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_19.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_19.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_2.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_20.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_20.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_21.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_21.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_22.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_22.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_23.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_23.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_24.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_24.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_25.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_25.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_26.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_26.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_27.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_27.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_28.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_28.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_3.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_30.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_30.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_31.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_31.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_32.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_32.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_33.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_33.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_34.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_34.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_35.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_35.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_36.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_36.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_37.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_37.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_38.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_38.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_4.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_4.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_5.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_5.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_6.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_6.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_7.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_7.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_8.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_8.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/game_ic_loading_9.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/game_ic_loading_9.webp -------------------------------------------------------------------------------- /pagestatushelper/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/page_status_demo_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YuJunKui1995/PageStatusHelper/HEAD/app/src/main/res/drawable-xxhdpi/page_status_demo_loading.gif -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 30dp 5 | 10dp 6 | 10dp 7 | 8 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Jul 04 14:15:51 CST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_custom_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /pagestatushelper/src/main/java/com/smartcity/commonbase/widget/pagestatus/OnEmptyClickListener.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by ychen on 2018/8/13. 7 | */ 8 | public interface OnEmptyClickListener { 9 | void onEmptyClick(View v); 10 | } 11 | -------------------------------------------------------------------------------- /pagestatushelper/src/main/java/com/smartcity/commonbase/widget/pagestatus/OnErrorClickListener.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Author: YuJunKui 7 | * Time:2017/12/8 16:03 8 | * Tips: 9 | */ 10 | 11 | public interface OnErrorClickListener { 12 | 13 | void onErrorClick(View v); 14 | } 15 | -------------------------------------------------------------------------------- /pagestatushelper/src/main/java/com/smartcity/commonbase/widget/pagestatus/OnNoLoginClickListener.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Author: YuJunKui 7 | * Time:2017/12/15 15:28 8 | * Tips: 9 | */ 10 | 11 | public interface OnNoLoginClickListener { 12 | 13 | void OnNoLoginClick(View v); 14 | } 15 | -------------------------------------------------------------------------------- /pagestatushelper/src/test/java/com/smartcity/commonbase/widget/pagestatus/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus; 2 | 3 | 4 | 5 | /** 6 | * Example local unit test, which will execute on the development machine (host). 7 | * 8 | * @see Testing documentation 9 | */ 10 | public class ExampleUnitTest { 11 | } -------------------------------------------------------------------------------- /pagestatushelper/src/main/java/com/smartcity/commonbase/widget/pagestatus/imp/FrameLayoutViewStatusImp.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus.imp; 2 | 3 | import android.view.ViewGroup; 4 | 5 | /** 6 | * Author: YuJunKui 7 | * Time:2017/12/8 10:57 8 | * Tips: 9 | */ 10 | 11 | public class FrameLayoutViewStatusImp extends ViewGroupViewStatusImp { 12 | 13 | @Override 14 | protected void initLayoutParams(ViewGroup.LayoutParams layoutParams) { 15 | //nothing 基类的处理已经足够了 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/src/test/java/com/smartcity/commonbase/widget/pagestatus/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /pagestatushelper/src/main/java/com/smartcity/commonbase/widget/pagestatus/imp/ViewStatusInterface.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus.imp; 2 | 3 | import android.view.View; 4 | 5 | import com.smartcity.commonbase.widget.pagestatus.LayoutParams; 6 | 7 | /** 8 | * Author: YuJunKui 9 | * Time:2017/12/8 10:55 10 | * Tips: 11 | */ 12 | 13 | public interface ViewStatusInterface { 14 | 15 | String ADD_View_TAG="add_view_tag"; 16 | 17 | void addStatusView(View bindView, View addView, LayoutParams params); 18 | 19 | void showContentView(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /pagestatushelper/push.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.novoda.bintray-release' 2 | 3 | def siteUrl = 'https://github.com/YuJunKui1995/PageStatusHelper' 4 | 5 | publish{ 6 | repoName = 'HouShanRen' 7 | userOrg = "yujkyujk" 8 | groupId = 'firemonkey' 9 | artifactId = 'pagestatushelper' 10 | publishVersion = '1.0.0' 11 | desc = 'Simple and elegant management of page status .' 12 | website = siteUrl 13 | } 14 | tasks.withType(Javadoc) {//防止编码问题 15 | options.addStringOption('Xdoclint:none', '-quiet') 16 | options.addStringOption('encoding', 'UTF-8') 17 | options.addStringOption('charSet', 'UTF-8') 18 | } 19 | 20 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /pagestatushelper/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_single_page_more_state.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 16 | 17 | 18 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/smartcity/commonbase/widget/pagestatus/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.smartcity.commonbase.widget.pagestatus", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pagestatushelper/src/androidTest/java/com/smartcity/commonbase/widget/pagestatus/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.smartcity.commonbase.widget.pagestatus.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pagestatushelper/src/main/java/com/smartcity/commonbase/widget/pagestatus/imp/RelativeLayoutViewStatusImp.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus.imp; 2 | 3 | import android.view.ViewGroup; 4 | import android.widget.RelativeLayout; 5 | 6 | /** 7 | * Author: YuJunKui 8 | * Time:2017/12/8 10:57 9 | * Tips: 10 | */ 11 | 12 | public class RelativeLayoutViewStatusImp extends ViewGroupViewStatusImp { 13 | 14 | @Override 15 | protected void initLayoutParams(ViewGroup.LayoutParams layoutParams) { 16 | 17 | //状态view的params 18 | RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) layoutParams; 19 | //bindView的 20 | RelativeLayout.LayoutParams bindViewParams = (RelativeLayout.LayoutParams) bindView.getLayoutParams(); 21 | 22 | //bindView的对齐关系 23 | int[] rules = bindViewParams.getRules(); 24 | for (int i = 0; i < rules.length; i++) { 25 | params.addRule(i, rules[i]); 26 | } 27 | // ok 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /pagestatushelper/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply from: 'push.gradle' 3 | //apply from: 'push2.gradle' 4 | android { 5 | compileSdkVersion 27 6 | 7 | 8 | 9 | defaultConfig { 10 | minSdkVersion 19 11 | targetSdkVersion 27 12 | versionCode 1 13 | versionName "1.0" 14 | 15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 16 | 17 | lintOptions { 18 | abortOnError false 19 | } 20 | } 21 | 22 | buildTypes { 23 | release { 24 | minifyEnabled false 25 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 26 | } 27 | } 28 | 29 | } 30 | 31 | dependencies { 32 | implementation fileTree(include: ['*.jar'], dir: 'libs') 33 | implementation 'com.android.support:appcompat-v7:27.1.1' 34 | 35 | implementation 'com.android.support.constraint:constraint-layout:1.1.3' 36 | 37 | implementation 'com.android.support:design:27.1.1' 38 | } 39 | -------------------------------------------------------------------------------- /pagestatushelper/src/main/java/com/smartcity/commonbase/widget/pagestatus/imp/LinearLayoutViewStatusImp.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus.imp; 2 | 3 | import android.util.Log; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | import android.view.ViewTreeObserver; 7 | import android.widget.LinearLayout; 8 | 9 | import com.smartcity.commonbase.widget.pagestatus.LayoutParams; 10 | import com.smartcity.commonbase.widget.pagestatus.ViewUtils; 11 | 12 | /** 13 | * Author: YuJunKui 14 | * Time:2017/12/8 10:57 15 | * Tips: LinearLayoutView和ViewGroupView 存在两点差异 16 | * 1、LinearLayoutView的bindView不能INVISIBLE 17 | */ 18 | 19 | public class LinearLayoutViewStatusImp extends ViewGroupViewStatusImp { 20 | 21 | private static final String TAG = "LinearLayoutViewStatusI"; 22 | 23 | @Override 24 | protected void initLayoutParams(ViewGroup.LayoutParams layoutParams) { 25 | //nothing 基类的处理已经足够了 26 | } 27 | 28 | @Override 29 | public void hideContent(View bindView) { 30 | bindView.setVisibility(View.GONE); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/smartcity/commonbase/widget/pagestatus/test/FaceLoadingView.java: -------------------------------------------------------------------------------- 1 | package com.smartcity.commonbase.widget.pagestatus.test; 2 | 3 | import android.content.Context; 4 | import android.graphics.Color; 5 | import android.graphics.drawable.AnimationDrawable; 6 | import android.support.annotation.Nullable; 7 | import android.support.v7.widget.AppCompatImageView; 8 | import android.util.AttributeSet; 9 | 10 | /** 11 | * Author: YuJunKui 12 | * Time:2018/5/26 11:42 13 | * Tips: 14 | */ 15 | public class FaceLoadingView extends AppCompatImageView { 16 | 17 | public FaceLoadingView(Context context) { 18 | this(context, null); 19 | } 20 | 21 | public FaceLoadingView(Context context, @Nullable AttributeSet attrs) { 22 | this(context, attrs, -1); 23 | } 24 | 25 | public FaceLoadingView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 26 | super(context, attrs, defStyleAttr); 27 | setBackgroundColor(Color.WHITE); 28 | setImageResource(R.drawable.game_anim_loading); 29 | ((AnimationDrawable) this.getDrawable()).start(); 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 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 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # IntelliJ 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/dictionaries 41 | .idea/libraries 42 | 43 | # Keystore files 44 | # Uncomment the following line if you do not want to check your keystore files in. 45 | #*.jks 46 | 47 | # External native build folder generated in Android Studio 2.2 and later 48 | .externalNativeBuild 49 | 50 | # Google Services (e.g. APIs or Firebase) 51 | google-services.json 52 | 53 | # Freeline 54 | freeline.py 55 | freeline/ 56 | freeline_project_description.json 57 | *.ser 58 | .idea/codeStyles/Project.xml 59 | .idea/encodings.xml 60 | .idea/misc.xml 61 | .idea/modules.xml 62 | .idea/runConfigurations.xml 63 | .idea/vcs.xml 64 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | defaultConfig { 6 | applicationId "com.smartcity.commonbase.widget.pagestatus.test" 7 | minSdkVersion 19 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | compileOptions { 20 | sourceCompatibility JavaVersion.VERSION_1_8 21 | targetCompatibility JavaVersion.VERSION_1_8 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(include: ['*.jar'], dir: 'libs') 27 | implementation 'com.android.support:appcompat-v7:27.1.1' 28 | implementation 'com.android.support:design:27.1.1' 29 | implementation 'com.android.support.constraint:constraint-layout:1.1.0' 30 | testImplementation 'junit:junit:4.12' 31 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 32 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 33 | implementation project(':pagestatushelper') 34 | // api 'common:pagestatushelper:0.7.3' 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 |