Skip to content

Commit

Permalink
fix loading
Browse files Browse the repository at this point in the history
Signed-off-by: wangdongdong <wangdongdong@letv.com>
  • Loading branch information
wangdongdong committed Apr 20, 2017
1 parent 1172d26 commit f4f3dd2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,14 @@ public int dip2px(float dipValue) {
* @param state
*/
public void setState(BUTTON_STATES state) {
this.oldState = this.currentState;
this.currentState = state;

if (state == BUTTON_STATES.LOADING && oldState == BUTTON_STATES.LOADING) {
if (state == BUTTON_STATES.LOADING && currentState == BUTTON_STATES.LOADING) {
//not reStart loading while loading
return;
}

this.oldState = this.currentState;
this.currentState = state;

if (state == BUTTON_STATES.LOADING) {
mCircleTextProgressbar.setVisibility(VISIBLE);
mIconView.setVisibility(GONE);
Expand Down

0 comments on commit f4f3dd2

Please sign in to comment.