title: How to select itemclick event for listview with multiple rows in android?
body: <p>I am trying to get values from server and retrieved response from server, the details responsed from server are need to be displayed in a listview, i achieved that too, but while onitemclick process only first row in list view performs the click action but it is not performing for the remaining rows, how can i achieve it, dat is whatever the row and item i'm selecting it has to be processed by my code, here is my code for the reference,     .........   </p>
  
  <pre><code>    public void userInterface() throws JSONException 
      {
          if(json_user.get(0) != null)
          {
              downloadList1 = (ListView)findViewById(R.id.lvinbox);
              populateData();
              downloadList1.setOnItemClickListener(new OnItemClickListener() 
              {
                  public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3) 
                  {
                      // TODO Auto-generated method stub
                      fma=(TextView)findViewById(R.id.src);
                      st=(TextView)findViewById(R.id.sub);
                      fma.setOnClickListener(new OnClickListener() 
                      {
                          public void onClick(View v) 
                          {
                              // TODO Auto-generated method stub
                                                              String fm=fma.getText().toString();
                              String s=st.getText().toString();
                              Intent m = new Intent(getApplicationContext(), InActivity.class);
                              m.putExtra("f", fm);
                              m.putExtra("s", s);
                              startActivity(m);
                          }
                      });
                  st.setOnClickListener(new OnClickListener() 
                      {
                          public void onClick(View v) 
                          {
                              // TODO Auto-generated method stub
                              String fm=fma.getText().toString();
                              String s=st.getText().toString();
                              Intent m = new Intent(getApplicationContext(), InActivity.class);
                              m.putExtra("f", fm);
                              m.putExtra("s", s);
                              startActivity(m);
                          }
                      });
                  }
              });
          }
          else
          {
              Toast.makeText(getApplicationContext(),"Empty",  Toast.LENGTH_LONG).show();
              finish();
              Intent menu = new Intent(getApplicationContext(), MenActivity.class);
              menu.putExtra("username", dest);
              startActivity(menu);
          }
      }
      public void populateData() throws JSONException 
      {
          resultVector = new Vector&lt;ListDataItemInbox&gt;();
  
  
          int len = json_user.length();
          System.out.println("length---------------------&gt;"+len);
          for(int i=0;i&lt;len;i++)
          {
              JSONObject obj=json_user.getJSONObject(i);
  
              listData = new ListDataItemInbox();
              listData.sets(obj.getString(KEY_S));
              listData.setd(obj.getString(KEY_D));
              resultVector.add(listData);
  
              myHandler.post(myRunnable);
  
          }
      }
      private Handler myHandler = new Handler();
      private Runnable myRunnable = new Runnable() 
      {
          public void run() 
          {
              customListAdapter = new ListViewAdapterInbox(InActivity.this);
              customListAdapter.setResultsData(resultVector);
              downloadList1.setAdapter(customListAdapter);
          }
      };
  </code></pre>