I have an async task which is executed on file download, the progress update works quite fine for progress bar but it doesn't work (app crashes) if i use that values[0] for textview to display progress, i am not able to understand why..
@Override
protected void onProgressUpdate(Integer... values) {
super.onProgressUpdate(values);
Log.v("Progress ", Integer.toString(values[0]));
pbar.setProgress(values[0]);
// tmin and tmax are texview, on uncommenting app crashes.
//tmin.setText((values[0].toString()));
//tmax.setText((Integer.toString(lengthOfFile)));
}