Brendon wrote:
> I have a ListView that is populated with a custom adapter.  When an
> item is clicked with the trackball, it works fine, i.e. I can catch
> the event and move on, though when I touch an item with my finger
> there is no callback from the listener.  The item does respond to the
> touch, by turning orange for that moment.
> 
> Here is how I've setup the listener.  This is within an Activity, not
> a ListActivity.
> 
>                list.setOnItemClickListener(new
> AdapterView.OnItemClickListener() {
> 
>                                       public void onItemClick(AdapterView<?> 
> arg0, View arg1,
>                                                       int position, long id) {
>                                               viewItem(id);
> 
>                                       }
>                        });
> 
> What am I missing? Is there another listener I need to configure?

You need to call setOnItemSelectedListener() to handle taps like that.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Published!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to