Question: I have a listview with custom rows being populated from an custom `BaseAdaptor`. On click of any row, I open a new `Activity`.
Everything was working fine until I added the filter functionality to this list. When I search the list and THEN click on an Item, it doesn't open the activity associated with the filtered results. It opens up an Activity related to the Item at that position in Original list.

Eg. - 
Original List : AA, BA, CC, DA, ED, FF

Search : 'A'
Filtered results: AA, BA, DA

But when I click on item `DA` it opens up the Activity for `CC`. Extremely irritating. I have called `notifyDataSetChanged()` on the adapter.

I've been stuck with this problem for sometime. I really dont know how to solve it.
I didnt post the code because it's a whole lot of code and I really dont want to put everything here.

If someone can give me an idea of how to select the Item from the FILTERED list.. It'd b great.

Thanks!
Tell me if something else is needed to understand my question!

Answer: 
Thanks for replying all but I found the problem. 

I hope this helps another person. With something this basic, it sometimes gets hard to find the error and we resort to much complicated ways!

To start my new activity, I was taking the item position from the custom Adaptor without overriding the getItem() function. 

```
Object obj = myListAdapter.getItem(position);

```

I overrid the function

```
@Override
public Object getItem(int position) {
    return myList.get(position);
}

```

and voila! got the right Activity opening. (*facepalm* i know..)
Thanks for your answers anyway!
This happens because your CustomAdapter use your first Cursor not the filtered one 

you can use this in your Adapter definition :

```
public Cursor swapCursor(Cursor c1)
{
    super.swapCursor(c1);
    c = c1;
    notifyDataSetChanged();
    return c;

} 

```

and in your calling Activity use 

```
YourCustomAdapter.swapCursor(FilteredCursor);

```