Okay so here is what i am trying to do.....
new AsyncTask<Void, Integer, Void>(){
@Override
protected Void doInBackground(Void... arg0) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void result) {
text1.setText("Nice to meet you "+name);
dismissDialog(typeBar);
}
@Override
protected void onPreExecute() {
typeBar = 0;
showDialog(typeBar);
}
}.execute((Void)null);
}
});
}
The problem is in my app the textView changes ALOT!. Every time the button is clicked..I dont want to right an AsyncTask each time the textView changes. That will be to tedious and use to much resouce. Does anyone is it a better way i can implement this?