Skip to content

Commit

Permalink
修复bug 页面切换,更新state状态。
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartDengg committed Apr 13, 2016
1 parent 2ba814f commit 4f79ce3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ public void showLoading() {
ProgressLayout.this.hideNetErrorView();
ProgressLayout.this.hideFailedView();
ProgressLayout.this.setContentVisibility(false);

this.currentState = LAYOUT_TYPE.LOADING;
}

public void showNone() {
Expand All @@ -130,6 +132,8 @@ public void showNone(OnClickListener retryListener) {
ProgressLayout.this.hideNetErrorView();
ProgressLayout.this.hideFailedView();
ProgressLayout.this.setContentVisibility(false);

this.currentState = LAYOUT_TYPE.NONE;
}

public void showNetError() {
Expand All @@ -144,6 +148,8 @@ public void showNetError(OnClickListener retryListener) {
ProgressLayout.this.hideNoneView();
ProgressLayout.this.hideFailedView();
ProgressLayout.this.setContentVisibility(false);

this.currentState = LAYOUT_TYPE.NETWORK_ERROR;
}

public void showFailed() {
Expand All @@ -158,6 +164,8 @@ public void showFailed(OnClickListener retryListener) {
ProgressLayout.this.hideNoneView();
ProgressLayout.this.hideNetErrorView();
ProgressLayout.this.setContentVisibility(false);

this.currentState = LAYOUT_TYPE.FAILED;
}

public void showContent() {
Expand All @@ -168,6 +176,8 @@ public void showContent() {
ProgressLayout.this.hideFailedView();

ProgressLayout.this.setContentVisibility(true);

this.currentState = LAYOUT_TYPE.CONTENT;
}

public LAYOUT_TYPE getCurrentState() {
Expand Down

0 comments on commit 4f79ce3

Please sign in to comment.