For now I have shelved the issue of it not stopping (I really need the
onclick to remain on control)

However I have hit what is probably a worse issue. While using
horizontal scrollViews in a ListView I frequently get an issue where
the horizontal scroll view stops animating IE when I drag it it
doesn't show the new child controls UNTIL I then scroll the parent
listView! It's horrible I can't see what is causing it have you come
across this issue? It's as if the Horizontalscroll GUI calls are not
being pumped until the listView needs to animate .... Roman I think I
may need your help on this one!

Tom

On Nov 23, 10:59 pm, Alexander Lucas <callingshot...@gmail.com> wrote:
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to