Skip to content

Commit ea3e444

Browse files
committed
fix #6
1 parent cf3816a commit ea3e444

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
minSdkVersion 11
1010
targetSdkVersion 26
1111
versionCode 2
12-
versionName "1.0.2"
12+
versionName "1.0.3"
1313
}
1414

1515
buildTypes {

library/src/main/java/me/bakumon/statuslayoutmanager/library/StatusLayoutManager.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ public void showSuccessLayout() {
120120
private void createLoadingLayout() {
121121
if (loadingLayout == null) {
122122
loadingLayout = inflate(loadingLayoutID);
123+
} else {
124+
loadingLayout.setBackgroundColor(defaultBackgroundColor);
123125
}
124-
loadingLayout.setBackgroundColor(defaultBackgroundColor);
125126
if (!TextUtils.isEmpty(loadingText)) {
126127
TextView loadingTextView = loadingLayout.findViewById(R.id.tv_status_loading_content);
127128
if (loadingTextView != null) {
@@ -158,8 +159,9 @@ public void showLoadingLayout() {
158159
private void createEmptyLayout() {
159160
if (emptyLayout == null) {
160161
emptyLayout = inflate(emptyLayoutID);
162+
} else {
163+
emptyLayout.setBackgroundColor(defaultBackgroundColor);
161164
}
162-
emptyLayout.setBackgroundColor(defaultBackgroundColor);
163165

164166
if (onStatusChildClickListener == null) {
165167
return;
@@ -238,8 +240,9 @@ public void showEmptyLayout() {
238240
private void createErrorLayout() {
239241
if (errorLayout == null) {
240242
errorLayout = inflate(errorLayoutID);
243+
} else {
244+
errorLayout.setBackgroundColor(defaultBackgroundColor);
241245
}
242-
errorLayout.setBackgroundColor(defaultBackgroundColor);
243246

244247
if (onStatusChildClickListener == null) {
245248
return;

0 commit comments

Comments
 (0)