[android-developers] Re: ListView with rows that contain a button

2010-09-23 Thread grace
hi,

as the button has the clickable property the listrow which holds the
button doesnot hold this property.
u can sroll down the list but u cannot click the list row.

On Sep 24, 6:35 am, John Gaby  wrote:
> I have a ListView control for which I supply my own ListAdapter.  When
> my adapter's 'getView' is called, I return a view which contains other
> controls.  Now if the view that I return contains only TextViews, then
> everything works fine.  However if I place a Button control on the
> view that I return, then I do not seem to be able to select a row of
> the table anymore.  I can scroll the table, and touch the button that
> is in the row and get it's 'onClick' message, but I never receive an
> 'onItemClick' message from the ListView control.
>
> Is this supposed to work?  If so, does anyone have any idea what might
> be going wrong?
>
> Thanks.

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


[android-developers] Re: ListView with rows that contain a button

2010-09-23 Thread John Gaby
Thanks for the reply.

So it is not possible to have a button and still be able to click the
list row?  That seems pretty limiting.

On Sep 23, 9:22 pm, grace  wrote:
> hi,
>
> as the button has the clickable property the listrow which holds the
> button doesnot hold this property.
> u can sroll down the list but u cannot click the list row.
>
> On Sep 24, 6:35 am, John Gaby  wrote:
>
> > I have a ListView control for which I supply my own ListAdapter.  When
> > my adapter's 'getView' is called, I return a view which contains other
> > controls.  Now if the view that I return contains only TextViews, then
> > everything works fine.  However if I place a Button control on the
> > view that I return, then I do not seem to be able to select a row of
> > the table anymore.  I can scroll the table, and touch the button that
> > is in the row and get it's 'onClick' message, but I never receive an
> > 'onItemClick' message from the ListView control.
>
> > Is this supposed to work?  If so, does anyone have any idea what might
> > be going wrong?
>
> > Thanks.

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


[android-developers] Re: ListView with rows that contain a button

2010-09-24 Thread viktor
Hi John, it is possible, in my example, I use ListView and all list
items contain "button" (LinearLayout with selector), it works fine, I
can push on item or on "button". And I set click listener for all
buttons.

I hope my information will be helpful.

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


[android-developers] Re: ListView with rows that contain a button

2010-09-24 Thread John Gaby
Thanks for the reply.

Did you do anything special to make it work?  Can you suggest why it
is not working for me?  I am using a custom ViewGroup for the row
views.  Is there something I need to be doing there?

Thanks

On Sep 24, 2:11 am, viktor  wrote:
> Hi John, it is possible, in my example, I use ListView and all list
> items contain "button" (LinearLayout with selector), it works fine, I
> can push on item or on "button". And I set click listener for all
> buttons.
>
> I hope my information will be helpful.

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


[android-developers] Re: ListView with rows that contain a button

2010-09-27 Thread Brian
Viktor, would it be possible to see your example?

On Sep 24, 2:11 am, viktor  wrote:
> Hi John, it is possible, in my example, I use ListView and all list
> items contain "button" (LinearLayout with selector), it works fine, I
> can push on item or on "button". And I set click listener for all
> buttons.
>
> I hope my information will be helpful.

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