The question may sound tricky….
but, the thing is, I’ve got a custom list view with a checkbox and a textview on every row… I’ve used android:onClick=”checkmethod” to make a process when a checkbox are checked..
here’s a sample code..
public void checkMethod(View v) {
LinearLayout vwParentRow = (LinearLayout)v.getParent();
CheckBox check = (CheckBox) vwParentRow.findViewById(R.id.checkBox_list);
if (check.isChecked()) {
//My process goes here
}else{
//Another process comes here
}
}
now, what I want to do is checking the checkboxes if their states are all unchecked…
how can I do this? can someon please help me asap? thanks in advance!!
This is the fastest and simplest approach I know about:
private int counteras a class member, and initialize it to 0.counter == 0