views:

218

answers:

2

So, i'm having a problem (newbie one) with a CheckBox Listener AND a ListView. I need to request the '...long id) that passes through the Overriden method onListItemClick and put it into a OnCheckedChangeListener. How should i do that?

If you guys need the code i can post it!

Thanks in advance!!

+1  A: 

You should not be using checkboxes in ListView but ListView's choiceMode instead. It takes care of everything for you.

If you really want to keep using checkboxes, you could store the id of your item in the tag of your checkbox in the Adapter's getView() (or bindView()) method. Look at View.setTag() to see how to do this.

Romain Guy
Thanks man. I will check it out!
Philipz
A: 

I cant get it done the way Romain said :( Could i do succesfully sending a intent with the id to my cbListener?

Philipz