@@ -120,8 +120,9 @@ public void showSuccessLayout() {
120
120
private void createLoadingLayout () {
121
121
if (loadingLayout == null ) {
122
122
loadingLayout = inflate (loadingLayoutID );
123
+ } else {
124
+ loadingLayout .setBackgroundColor (defaultBackgroundColor );
123
125
}
124
- loadingLayout .setBackgroundColor (defaultBackgroundColor );
125
126
if (!TextUtils .isEmpty (loadingText )) {
126
127
TextView loadingTextView = loadingLayout .findViewById (R .id .tv_status_loading_content );
127
128
if (loadingTextView != null ) {
@@ -158,8 +159,9 @@ public void showLoadingLayout() {
158
159
private void createEmptyLayout () {
159
160
if (emptyLayout == null ) {
160
161
emptyLayout = inflate (emptyLayoutID );
162
+ } else {
163
+ emptyLayout .setBackgroundColor (defaultBackgroundColor );
161
164
}
162
- emptyLayout .setBackgroundColor (defaultBackgroundColor );
163
165
164
166
if (onStatusChildClickListener == null ) {
165
167
return ;
@@ -238,8 +240,9 @@ public void showEmptyLayout() {
238
240
private void createErrorLayout () {
239
241
if (errorLayout == null ) {
240
242
errorLayout = inflate (errorLayoutID );
243
+ } else {
244
+ errorLayout .setBackgroundColor (defaultBackgroundColor );
241
245
}
242
- errorLayout .setBackgroundColor (defaultBackgroundColor );
243
246
244
247
if (onStatusChildClickListener == null ) {
245
248
return ;
0 commit comments