I have a list adapter using a viewholder pattern, my problem is I need to update a TextView from the viewholder in onpostexecute() of an AsyncTask contained within the same class, but this always returns a nullpointer on the TextView, how can give my textviews from the viewholder enough scope that I can change them in teh AsyncTask? I will include a code example below, thanks in adcvance

```
public class ListAdapter extends BaseAdapter {

TextView tvA1, tvA2;

Integer submitId;
String submitQuestion;

public ListAdapter() {

  ....

}

@Override
public View getView(int position, View convertView, ViewGroup parent) {

    friendsViewHolder holder = null;

    if (convertView == null) {

        holder = new friendsViewHolder();

        convertView = inflater.inflate(R.layout.list_item_status, null);

        holder.tvA1 = (TextView) convertView
                .findViewById(R.id.tvA1);
        holder.tvA2 = (TextView) convertView
                .findViewById(R.id.tvA2);
        holder.btQ1 = (LinearLayout) convertView
                .findViewById(R.id.btConfirm);
        holder.btQ2 = (LinearLayout) convertView
                .findViewById(R.id.btDeny);

        convertView.setTag(holder);
    } else {
        holder = (friendsViewHolder) convertView.getTag();
    }

    tvA1 = holder.tvA1;
    tvA2 = holder.tvA2;

    holder.btQ1.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            submitId = id;
            submitQuestion = q1;

            new UpdateAnswer().execute();

        }
    });

    holder.btQ2.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            submitId = id;
            submitQuestion = q2;

            new UpdateAnswer().execute();

        }
    });

    return convertView;

}

static class friendsViewHolder {

    TextView tvA1, tvA2;
    LinearLayout btQ1, btQ2;

}

private class UpdateAnswer extends AsyncTask<Void, Void, ArrayList<Object>> {

    @Override
    protected ArrayList<Object> doInBackground(Void... params) {

        return apiHelper.submitAnswer(submitId, submitQuestion);

    }

    @Override
    protected void onPostExecute(ArrayList<Object> answers) {
        super.onPostExecute(answers);

        if (answers != null) {

            Integer a1 = (Integer) answers.get(1);
            Integer a2 = (Integer) answers.get(2);

            //Error here
            tvA1.setText(a1);
            tvA1.setVisibility(View.VISIBLE);

            //error here
            tvA2.setText(a2);
            tvA2.setVisibility(View.VISIBLE);

        }

    }
}
}

```