I have a ListActivity; and for each item in the ListView there is a checkbox.
When you touch a list item, another Activity launches.
When you use the trackpad/trackball to highlight (read: select) an item and click the trackpad, it essentially simulates touching the item. This causes my other Activity to launch.
I would like clicking the trackpad to check the checkbox of the highlighted item. Is there a handler I can override to do this?
You need to override the
onTrackballEvent(MotionEvent)method and catchACTION_DOWN. Here is an example of how to do this:Hope this works for you!