title: How to update a textview of adapter in an activity
body: <p>I have a textview in my adapter class and I have to update the textview in activity since I am getting the result in activity. How can i do that? 
  This is my activity class. I want to update textview  tv2 with "some text". I have even tried updating textview in adapter but I wasn't successful in doing that.</p>
  
  <pre><code>public class TextviewActivity extends AppCompatActivity {
  ListView lvText;
  ArrayList&lt;TextviewPojo&gt; textviewPojos = new ArrayList&lt;&gt;();
  TextviewAdapter textviewAdapter;
  TextView tv2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_textview);
  
      lvText = findViewById(R.id.lvText);
      textviewAdapter = new TextviewAdapter(textviewPojos,this);
      lvText.setAdapter(textviewAdapter);
      textviewPojos.add(new TextviewPojo("first text","second text"));
      textviewPojos.add(new TextviewPojo("first text","second text"));
  
  
    }
  }
  </code></pre>
  
  <p>This is my adapter class. </p>
  
  <pre><code>public class TextviewAdapter extends BaseAdapter {
    ArrayList&lt;TextviewPojo&gt; textviewPojos = new ArrayList&lt;&gt;();
    Context context;
  
    public TextviewAdapter(ArrayList&lt;TextviewPojo&gt; textviewPojos, Context context) {
      this.textviewPojos = textviewPojos;
      this.context = context;
    }
  
    @Override
    public int getCount() {
      return textviewPojos.size();
    }
  
    @Override
    public Object getItem(int position) {
      return null;
    }
  
    @Override
    public long getItemId(int position) {
      return 0;
    }
  
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      if(convertView == null){
        convertView = LayoutInflater.from(context).inflate(R.layout.item_textview,parent,false);
      }
      TextView tv1,tv2;
      TextviewPojo textviewPojo = textviewPojos.get(position);
      tv1 = convertView.findViewById(R.id.tv1);
      tv2 = convertView.findViewById(R.id.tv2);
  
      tv1.setText(textviewPojo.getText1());
      tv2.setText(textviewPojo.getText2());
      return convertView;
    }
  }
  </code></pre>
  
  <p>Below is my item layout. - item_textview</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="horizontal" android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;TextView
          android:id="@+id/tv1"
          android:textSize="30sp"
          android:layout_weight="1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="filename1"/&gt;
      &lt;TextView
          android:id="@+id/tv2"
          android:layout_weight="1"
          android:textSize="30sp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="filename2"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>