How would I calculate percentage of checkboxes clicked?
问题 I'm making an app that has 39 checkboxes in it. I want it to calculate the percentage of checkboxes that are currently clicked. This is java code of the app: public class Bifrost extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bifrost); //SPREMENLJIVKE final CheckBox cb1 = (CheckBox) findViewById(R.id.checkBox1); cb1.setChecked(getFromSP("cb1")); cb1.setOnCheckedChangeListener(new