Question: I have a list view in which I show data. When I click on a row of the list view, I want to display data for that row from web services. How do I do that?

Answer: 
What you do is set the `ListView`'s [`OnItemClickListener`](http://developer.android.com/reference/android/widget/AdapterView.OnItemClickListener.html) with the [`setOnItemClickListener`](http://developer.android.com/reference/android/widget/AdapterView.html#setOnItemClickListener%28android.widget.AdapterView.OnItemClickListener%29) method. You then obtain the "item object" for the clicked item with the [`getItemAtPosition`](http://developer.android.com/reference/android/widget/AdapterView.html#getItemAtPosition%28int%29) method:

```
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    public void onItemClick(AdapterView<?> parentView, View itemView, int position, long id) {
        ListView listView = (ListView) parentView;
        Object o = listView.getItemAtPosition(position);
        //...
    }
});

```

The type of the "item object" (`o` in the example above) depends on the [`ListAdapter`](http://developer.android.com/reference/android/widget/ListAdapter.html) that the list view is using. One common choice is `CursorAdapter`, in which case the type of the item object is conveniently the [`Cursor`](http://developer.android.com/reference/android/database/Cursor.html) to the record corresponding to the list item that was clicked.
```
ListView lv = getListView();
lv.setTextFilterEnabled(true);

lv.setOnItemClickListener(new OnItemClickListener() {
  public void onItemClick(AdapterView<?> parent, View view,
      int position, long id) {
    // When clicked, show a toast with the TextView text
    Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
        Toast.LENGTH_SHORT).show();
  }
});

```