Hello again Mark,

Thanks for the help. I really appreciate it. It worked. I also had to
move the button wiring section after the view set-up section.

Next, I need to make sure that each and every "kill" button is wired,
not just the one for the first item in the list.

In order to do that, do you think it would be sufficient to set up a
loop ranging across all members of the dataset (in my case an
ArrayList) in getView?

Thanks.

Alex Donnini

On Nov 17, 5:25 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> alexdonnini wrote:
> > Hello Mark,
>
> If you're referring to me, hi!
>
> > I read carefully your very good tutorials on lists
>
> Thanks!
>
> > b) The button which is wired does not act on the desired item because
> > the value of the "position" parameter returned by getView.
>
> That's because you're not holding onto it. At least, near as I can tell
> from the code listing you supplied.
>
> Add position to your ViewHolder. Fill in the ViewHolder's position at
> the same time you update the TextView and ImageView. When your button
> clicks, get the ViewHolder from the button's parent, get the position
> out of the ViewHolder, and use that position.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to