Timer

 


View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}

new CountDownTimer(60000, 1000) {

public void onTick(long millisUntilFinished) {
timer.setText("00: " + millisUntilFinished / 1000);
}

public void onFinish() {
timer.setText(" 00 : 00 ");
}
}.start();

Comments

Popular posts from this blog

API

How to get latitude longitude simply in Android using Address

Manifest