diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index d4c2d98..d76c0bd 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -3,9 +3,6 @@
diff --git a/.idea/misc.xml b/.idea/misc.xml
index cc04cd3..b3ebd66 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,12 +16,14 @@
+
+
-
+
@@ -31,11 +33,13 @@
+
+
-
+
diff --git a/library/build.gradle b/library/build.gradle
index 39be56b..74ae4cf 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
- versionCode 26
- versionName "1.2.6"
+ versionCode 27
+ versionName "1.2.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -29,7 +29,7 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// SUPPORT LIBRARY
- implementation 'androidx.appcompat:appcompat:1.0.2'
+ implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.cardview:cardview:1.0.0'
diff --git a/library/src/main/java/com/vasl/recyclerlibrary/MyCustomView.java b/library/src/main/java/com/vasl/recyclerlibrary/MyCustomView.java
index 501d1c2..c151fa6 100644
--- a/library/src/main/java/com/vasl/recyclerlibrary/MyCustomView.java
+++ b/library/src/main/java/com/vasl/recyclerlibrary/MyCustomView.java
@@ -374,53 +374,96 @@ public void setStatus(ListStatus status) {
showError();
break;
}
-
}
- public void setStatus(ListStatus status, @Nullable String title) {
+ public void setStatus(ListStatus status, @Nullable String subTitle) {
switch (status) {
case LOADING:
- showLoading();
+ hideLoading();
+ hideLoadingBottom();
hideEmptyView();
hideRecyclerView();
hideSwipe();
hideError();
+
+ invalidate(); // for redraw
+
+ showLoading();
break;
case SUCCESS:
hideLoading();
+ hideLoadingBottom();
hideEmptyView();
- showRecyclerView();
+ hideRecyclerView();
hideSwipe();
hideError();
+
+ invalidate(); // for redraw
+
+ showRecyclerView();
break;
case FAILURE:
hideLoading();
+ hideLoadingBottom();
hideEmptyView();
hideRecyclerView();
hideSwipe();
- setErrorTitle(title);
+ hideError();
+ setErrorSubTitle(subTitle);
+
+ invalidate(); // for redraw
+
showError();
break;
case EMPTY:
hideLoading();
+ hideLoadingBottom();
+ hideEmptyView();
hideRecyclerView();
hideSwipe();
hideError();
- setEmptyTitle(title);
+ setEmptySubTitle(subTitle);
+
+ invalidate(); // for redraw
+
showEmptyView();
break;
case UNDEFINE:
hideLoading();
+ hideLoadingBottom();
hideEmptyView();
hideRecyclerView();
hideSwipe();
+ hideError();
+
+ invalidate(); // for redraw
+
showError();
break;
+
+ case LOADING_BOTTOM:
+ hideLoading();
+ hideLoadingBottom();
+ hideEmptyView();
+ // hideRecyclerView();
+ hideSwipe();
+ hideError();
+
+ invalidate(); // for redraw
+
+ showLoadingBottom();
+ break;
+
default:
hideLoading();
+ hideLoadingBottom();
hideEmptyView();
hideRecyclerView();
hideSwipe();
+ hideError();
+
+ invalidate(); // for redraw
+
showError();
break;
}