you should use CountDownTimer
for that:
timer = new CountDownTimer( 3000, 1000 ) {
@Override public void onTick( long millisUntilFinished ) {
button.setText( "count down " + millisUntilFinished );
}
@Override public void onFinish() {
button.setOnClickListener( onClickListener );
}
};
somewhere down below:
timer.start()