I am using switch component inside my list item. But no matter I enable the switch or not. It's returning false.
group_select.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (group_select.isChecked()){
Toast.makeText(context, "Checked at "+position, Toast.LENGTH_SHORT).show();
}
else if (!group_select.isChecked()){
Toast.makeText(context, "Unchecked at "+position, Toast.LENGTH_SHORT).show();
}
}
});
Thanx for the help....