The problem:
I have a ListView
item with a relatively complex layout. One of the children in the list item view is a TextView
with links. The TextView
can handle the clicks on links found in it(by using Linkify
), and has a OnClickListener
that handles click on parts of the text that are not links. The listener will just get the position of the view in the ListView
and perform a click:
@Override
public void onClick(View v) {
int position = mListView.getPositionForView(v);
mListView.performItemClick(v, position, mAdapter.getItemId(position));
}
Everything works fine, except the click doesn't trigger the ListView
to update the list item's drawable state. It does trigger that when you click on other TextView
s in the item that are not clickable.
Thanks!