使用AsyncTask
时遇到问题。
我想要同时运行3种方法。
如何在Android OpenCV中使用AsyncTask
执行此操作?
公共类DoTask扩展了AsyncTask {
@Override
protected Void doInBackground( Void... params) {
Handler handler = new Handler(Looper.getMainLooper());
handler.post(new Runnable() {
public void run() {
}
});
return null;
}
}
答案 0 :(得分:0)
public class DoTask extends AsyncTask<String, String, String>{
@Override
protected String doInBackground(String... params) {
// TODO Auto-generated method stub
yourActvity.runOnUiThread(new Runnable() {
@Override
public void run() {
DrawLetter1();
DrawLetter2();
DrawLetter3();
}
});}