Android get thing clicked in listview to setText
<p>I have two classes, a listview class with many strings and a class with a text view ..
I want when I click on a string on the listview the second class starts and the textView in it is setText to the item clicked ..</p>

<p>I tried:</p>

<pre><code>      @Override
      protected void onListItemClick(android.widget.ListView l, View v, int position, long id) 
      {
          super.onListItemClick(l, v, position, id);
          String item = (String) getListAdapter().getItem(position);
          Intent select = new Intent(LV.this, Main.class);
          startActivity(select);
      }
</code></pre>

<p>and on the second class its </p>

<pre><code>S.setText(LV.item); 
</code></pre>

<p>S is the textview </p>

<p>now it appears null ..</p>
