Hey guys,

Well it turns out that in order to allow the ListView to handle the
long presses you need to attach a LongClick listener to any button you
are listening for click events and return false so that the long press
can be propagated down to the parent...

-Moto

On Jul 21, 2:54 am, metal mikey <[email protected]> wrote:
> Typically one doesn't longclick a button, rather one would simply
> click a button...
>
> I've implemented buttons within childViews and groupViews in an
> ExpandableList (similar, but more hardcore than your situation ;), so
> it definitely can be done...how'd I do this? Well I don't have the
> code at hand, as I recall it took some adjusting of focussable and
> clickable properties in the various views that made up the list, the
> groupViews, and the childViews.
>
> If/when you get it working using the lead I've provided, would be
> great if you can document the solution properly in this thread!
>
> On Jul 21, 12:51 pm, greg <[email protected]> wrote:
>
> > "implements ListView.OnItemLongClickListener"
>
> > On Jul 20, 10:20 pm, Moto <[email protected]> wrote:
>
> > > Hi all!
> > > I got a ListView item that contains a button inside.
>
> > > Currently the long press of a ListView item does not get processed.  I
> > > thought that by setting the Button.setLongClickable(false) would allow
> > > the long press to be passed along to the ListView item and it's not
> > > happening...
>
> > > Any help on this?
>
> > > Thanks!
> > > -Moto

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