I do have that listener defined as well. Though again, I'm not getting a
callback when I touch it.  I do get a call back when selecting an item with
the trackball.

             list.setOnItemSelectedListener(new
AdapterView.OnItemSelectedListener() {
                public void onItemSelected(AdapterView<?> arg0, View arg1,
                        int position, long id) {
                        Log.v(this.toString(), "Item Selected");
                        viewItem(id);
                }

                public void onNothingSelected(AdapterView<?> arg0) {
                    // TODO Auto-generated method stub
                    Log.v(this.toString(), "Nothing Selected");



On Sun, Feb 1, 2009 at 2:12 PM, Mark Murphy <[email protected]> wrote:

>
> 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!
>
> >
>


-- 

Brendon

--~--~---------~--~----~------------~-------~--~----~
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