I have a class called MainActivity.java that call an AsyncTask class. The last class have a findViewById() that in execution retur
put imageview as a variable of your class
private ImageView image;
on your onCreate initialize
image = (ImageView) findViewById(R.id.image);
public class Connection extends AsyncTask {
public String result;
//I know, this isn't correct, how can i do?
public MainActivity MainActivity;
@Override
protected String doInBackground(String... arg0) {
// TODO Auto-generated method stub
//...
return "a string";
}
protected void onPostExecute(String result) {
super.onPostExecute(result);
//...
// Where the error is generated
//do other stuff with your imageview
//...
}
}