1

How to break a loop which is inside the Thread, using a button on Android

view story
linux-howto

http://stackoverflow.com – I wanted to break the loop which is inside the Thread timer by use stop button. But Ecclips shows error "Syntax error on token(s), misplaced construct(s)" on stopsound(); method inside the Thread timer. I know that we cant defining a function inside a for loop, that why am getting the error. But i just wanted to know, how can we break the loop which is inside the Thread timer by using stop button ? stop = (ImageButton) findViewById(R.id.imageButton3); stop.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { stopsound(); } }); public voi (HowTos)