I was having the same issue, and after reading through this thread
(and some excessive experimentation) I found the following:

-In my case it ended up working best that I not explicitly set
focusable, focusable in touch mode, or clickable on anything-  either
on the list as a whole or on individual items.  Doing so had me
bouncing back and forth between two scenarios:  One where items could
be clicked but scrolling wouldn't stop on touch correctly - The other
where scrolling worked right but "click" events on touch never fired.

-I stripped out the listener I was registering in my custom adapter's
getView (convertView.setOnClickListener(blahblah).  Instead, from
within my activity, for "ListView lv" I called
"lv.setOnItemClickListener" and passed it an anonymous inner class.
Initially I had tried having the custom listview implement
"AdapterView.OnItemClickListener" interface, and within the
constructor calling "this.setItemClickListener(this)".  At no point
did this work:  Item clicks never fired on touch.  I'm honestly still
a little confused about why the behavior should be different, I feel
like I'm missing something obvious...

-This sort of falls under the category of stripping out listeners set
and defined in the adapter's getView, but it bears special mention.
>From within getView I was calling "registerForContextMenu" on
individual list items.  This worked fine, and didn't explicitly set
focus or clicks or anything from what I could tell.  However, once I
commented this line out, scrolling started to work correctly.  In case
I'm not the only person who's made this mistake, the solution is to
pass registerForContextMenu the *ListView* as a parameter from
wherever you're creating the listview object, not to call it on
individual items from within the adapter's getview method.

Hope this helps.
-Alex

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