hey hiii

I have already set the click listener for the button in each list item
and that is working fine.

But my requirement is that i want the listener for the button(which is
a part of list item) as well as for the whole list item.In this case
if i implement the listener for button my list item listener is not
responding.....

For ur information let me tell u that my list view is custon with each
list item having one text view and n no. of buttons and i want the
listener for the whole list item as well as for the buttons in the
list item, buttons part im able to do but list item part not working:(:
(

Plzzz helppp...........


On Jun 3, 7:13 pm, "Ericson, Anders" <[email protected]>
wrote:
> Hi,
>
> The way it works is that if yourlistitem(or a part of yourlistitem) is 
> clickable (like thebutton) it will "steal" the touch event from the ListView, 
> so the ListView will not be able to callonItemClick().
>
> One way to solve it is to set a click listener to thebuttonin eachitemview. 
> This can be done from the adaptor. Though you need to make sure you don't 
> leak listeners. You can for example set the same listener to all items and 
> figure out exactly whatitemwas pressed by tagging theitem-views with the 
> position, and then checking the tag in the onClick() callback.
>
> /Anders
>
>
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of prachi
> Sent: den 3 juni 2010 15:58
> To: Android Developers
> Subject: [android-developers] how toenableonItemClickfor customlistview
>
> Hey hiii allllll
>
> I hav alistview,eachlistitemhas a text view and abutton.
>
> MyonItemClick() forlistitemis not responding.But if i remove 
> thebuttonfromlistitemit is responding..........
>
> Plzzzz helppp bcoz i want both to function  :(:(:(
>
> Any help would be appreciated:):):)
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

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