Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - How to tap ListView item programmatically

How to call ItemClickListener programmatically? listView.performItemClick() does not work. Is that possible?

like image 510
cool dev Avatar asked Mar 22 '12 10:03

cool dev


1 Answers

mList.performItemClick(     mList.getAdapter().getView(mActivePosition, null, null),     mActivePosition,     mList.getAdapter().getItemId(mActivePosition)); 

Where mActivePosition is your click position!

like image 168
Arun Jose Avatar answered Oct 02 '22 20:10

Arun Jose