I would like to create a ListView item layout where I can touch certain portions of a line item. This is similar to the behavior of the 2.0 s Contacts Call Log where I can click on the green phone logo to initiate a call or click on the incoming call details to get more information about the contact.
I don t need a behavior only implementation. I already know to bind OnClickListeners to the portions of the line items where I want to capture the press. My real issue is that the UI doesn t react properly in certain cases when a user press against a certain area of the screen. IE: if they clicked the green phone icon, only the box around the phone will highlight as pressed. Where as pressing the name will highlight that area.
I looked at the source code for the contacts app but it s very complicated and I was able to get some success I have issues where the source code is referencing Drawables and resources that aren t exposed in the SDK itself.
I would like a reasonable implementation that does not rely on internal resource of android. Or at least some pointers in the right direction.
I m looking for a solution that works with not only pressing but the 5-way directional keypad as well.
Here s a graphic that shows what I m talking about.
(source: the-gadgeteer.com)