So, I've created a list with a bunch of items, each item having a checkbox next to it. I created the checkboxes simply by using: lv1.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
My problem is that when I click either the checkbox or the list item, it runs the same event: (something similar to below, it's not exact code)
lv1.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view,
int position, long id)
{
.....
}
}
});
What I would like to do is: make it so that when i click the text next to the check box (the list item), it runs the setOnItemClickListener event, but when you click the actual checkbox, it either checks (or unchecks) and runs a different event.
How can I do this? Thanks!!
My problem is that when I click either the checkbox or the list item, it runs the same event: (something similar to below, it's not exact code)
lv1.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view,
int position, long id)
{
.....
}
}
});
What I would like to do is: make it so that when i click the text next to the check box (the list item), it runs the setOnItemClickListener event, but when you click the actual checkbox, it either checks (or unchecks) and runs a different event.
How can I do this? Thanks!!