Skip to content

Commit c5ec44e

Browse files
committed
CountdownTextView 倒计时为异常时回调onFinish()修正
1 parent 2d5f358 commit c5ec44e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/common/base/interfaces/ITextWatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
public interface ITextWatcher {
1212
/***
1313
* 文本变化中的回调
14-
* @param curEditText //changed by fee 2017-08-23 TextWatcher是TextView中的接口,故把参数对象提升到TextView
14+
* @param curEditText changed by fee 2017-08-23 TextWatcher是TextView中的接口,故把参数对象提升到TextView
1515
*/
1616
void onTextChanged(TextView curEditText);
1717

src/main/java/common/base/views/CountdownTextView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ public void start(long mMillisInFuture, long mCountdownInterval) {
8888
if (countDownTimer != null) {
8989
countDownTimer.cancel();
9090
}
91-
onFinish();
91+
if (this.mMillisInFuture != mMillisInFuture) {
92+
onFinish();
93+
}
9294
countDownTimer = null;
9395
return;
9496
}

0 commit comments

Comments
 (0)