I have a ListView with custom elements - 3 ImageViews and TextView. I have a call to setItemsCanFocus(true) , so I can make ImageViews available. I am currently using a SimpleAdapter to populate a view.
I would like to trigger the AdapterView onItemClick event when I click on one of these subzones. onItemClickListener receives the view as the second argument and can be used to determine which subtitle was clicked. Honestly, I expected this to be the default behavior, but unfortunately this is not the case.
Is there any way to implement this behavior without directly violating encapsulation (i.e. creating an adapter containing a link to its representation)?
What is an acceptable way to view events from views in list items? How do you not let the adapter know too much about ListView?
source share