title: How to get the value of a Listview item which is clicked in android?
body: <p>I have this below code access the ListView item value into string and display it in alert?</p>
  
  <pre><code>ListView shot = getListView();
  shot.setOnItemClickListener(this);
  
  public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,long arg3) {
  
      String S = arg1.getContext().toString();
      AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
  
      // set the message to display
      alertbox.setMessage(S).show();    
  }
  </code></pre>