答案 0 :(得分:0)
我将假设您使用CheckBox
s作为过滤器,因为您没有发布任何代码。以下是您希望为每个OnClickListener
CheckBox
int numChecked = 0;
checkbox.setOnCheckedChangedListener(new OnCheckedChangedListener(){
@Override
public void onCheckedChange(CompoundButton buttonView, boolean isChecked){
if(isChecked) numChecked++;
else numChecked--;
//insert code for what should happen on filter click
}
//do this for all of your checkboxes
textView.setText("filter(" + String.valueOf(numChecked) + ")");