I would like to display a toast While there are background audiorecord tasks running.
Right now I have something like this which displays a toast with an image in it just fine:
...onCreate(){
mHandler = new Handler();
//Toast Setup
LayoutInflater myInflater=LayoutInflater.from(this);
View view=myInflater.inflate(R.layout.toast_layout,null);
mytoast=new Toast(this);
mytoast.setView(view);
mytoast.setGravity(0, 1, 1);
mytoast.setDuration(Toast.LENGTH_LONG);
}
//HANDLER STUFF
final Runnable mUpdateResults = new Runnable() {
public void run() {
mytoast.show();
}
};
... onClick(){
audiorecordingtasks();
mHandler.post(mUpdateResults);
}
However, if I put mHandler.post(mUpdateResults); before my audiorecord tasks it waits until after the audiorecord task to finish before it displays it.
Anyone know how to display it before and DURING the audiorecord task?