use validation lib in cpp - add a timer
This commit is contained in:
parent
48a158b036
commit
e0627bd815
1 changed files with 17 additions and 2 deletions
|
@ -4,6 +4,7 @@ package info.nightscout.androidaps.plugins.CircadianPercentageProfile;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.CountDownTimer;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
@ -210,8 +211,15 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
||||||
timeshiftView.setError(null);
|
timeshiftView.setError(null);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
new CountDownTimer(5000, 1000) { //timer for 5sec
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
timeshiftView.setError(getString(R.string.timeshift_hint), null);
|
timeshiftView.setError(getString(R.string.timeshift_hint), null);
|
||||||
}
|
}
|
||||||
|
public void onFinish() {
|
||||||
|
timeshiftView.setError(null);
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -224,8 +232,15 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag
|
||||||
percentageView.setError(null);
|
percentageView.setError(null);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
new CountDownTimer(5000, 1000) { //timer for 5sec
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
percentageView.setError(getString(R.string.percentagefactor_hint), null);
|
percentageView.setError(getString(R.string.percentagefactor_hint), null);
|
||||||
}
|
}
|
||||||
|
public void onFinish() {
|
||||||
|
percentageView.setError(null);
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue