答案 0 :(得分:2)
点击按钮
尝试此操作 button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
new CountDownTimer(30000, 1000) {
public void onTick(long millisUntilFinished) {
mTextField.setText("seconds remaining: " + millisUntilFinished / 1000);
//here you can have your logic to set text to edittext
}
public void onFinish() {
mTextField.setText("done!");
}
}.start();
}
});