0
![Stack Overflow](http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png)
Use boolean cancel (boolean mayInterruptIfRunning).
Make the asyncTask a class variable.
AsyncTask translate_ = new translate();
Then call it like so in place.
translate_.execute(textToTranslate.getText().toString(), "az");
Within the button onclick cancel the asyncTask.
translate_.cancel...