51,396
社区成员




new R implements Runnable{
boolean running = true;
public void run(){
while(running){
// do something
}
}
publid void stop(){
this.runnint = false;
}
}
// ButtonView部分
R r = null;
onclick....(){
if(r != null){
r.stop();
}
r = new R();
new Thread(r).start();
}