Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不知道如何命名我的问题,但是每次用户单击正方形时,我都会尝试在一段时间内使用画布显示一些文本,我一直在尝试使用计时器
timer.schedule(new TimerTask() { public void run() { } }, 11000);
但这仅适用于第一次点击,第二次立即消失。
尝试
timer.schedule(new TimerTask() {....}, 0, //initial delay 11000); //subsequent rate