I tried this and it works at the most cases, the only strange case that I could not figure out yet why it happens, is when you rotate the device then I call a performClick to say Position cero, the onClickListener is called and the DetailView for the positioned cero is called, BUT if the last activated item was positioned 3, positioned 3 still continues highlighted.
Thank you, simple and useful tip!
However, the arguments seems to be pretty redundant….
I tried this and it works at the most cases, the only strange case that I could not figure out yet why it happens, is when you rotate the device then I call a performClick to say Position cero, the onClickListener is called and the DetailView for the positioned cero is called, BUT if the last activated item was positioned 3, positioned 3 still continues highlighted.
Thank you, so much!!!!!
Thank you!
I think this should be:
listView1.performItemClick(listView1getChildAt(3), 3, listView1.getItemIdAtPosition(3));
So you send just the row you need and not the whole listview.
code working for me,Thanks
thanks
thx but its do not highlite the index of my listview
i am using custom array adapter for bind listview
Thanks It worked for me.
How to read the coordinates of the touch (in the touch event)
send the correct position in the performItemClick command?
I would also like to handle touches in an empty space on the list.