I have an AsyncTask with a textview loaded in the class so it looks something like this:
private class MyClass extends AsyncTask<TextView, Void, Void>{
}
TextView tv;
Loaded this way
"new MyClass(tv).execute();"
The reason for this is because of I have a textview loaded inside a viewflipper and I have a long load method inside the task to implement a process dialog.
My error is found on “protected Void doInBackground(TextView… params) {” this is where params is a TextView[] but not a single TextView.
Does anyone have a solution of to this problem?
Your
TextViewis the first element inparams:NOTE:
If you plan to modify that
TextViewindoInbackground()don’t do it because you’ll throw an exception(you can’t modify a view from another thread, instead use theonPostExecutemethod).