【发布时间】:2015-08-31 05:47:21
【问题描述】:
我的意思是就像秒表一样,当点击按钮时,计时器一直打开,直到按下停止按钮
startbutton= (Button)findViewById(R.id.black1);
startbutton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v){
//Start the timer
}
});
stopbutton= (Button)findViewById(R.id.black1);
stopbutton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v){
//Stop the timer
}
});
第二个问题,
如果计时器显示 90 秒,如何让它在屏幕上显示图像视图或按钮?像一些 if 语句使按钮可见,每个计时器计数为 90 秒(90、180、270 等),他会将按钮可见性设置为可见。
之前谢谢。
【问题讨论】:
-
感谢您提供一些链接,这对您有所帮助,但仍然没有回答我的第二个问题