Пример #1
0
 public void onClick(View view) {
   if (view instanceof CheckBoxWidget) {
     CheckBoxWidget checkboxwidget = (CheckBoxWidget) view;
     boolean flag;
     flag = !checkboxwidget.isChecked();
     checkboxwidget.setChecked(flag);
   }
 }
Пример #2
0
 private void initAbilitiesCBWs() {
   abilitiesList = (LinearLayout) findViewById(R.id.abilities_list);
   containersAbilityCBW = new CheckBoxWidget(this);
   containersAbilityCBW.setTitleView(getString(R.string.containers_abilities_label));
   containersAbilityCBW.setOnClickListener(this);
   totesAbilityCBW = new CheckBoxWidget(this);
   totesAbilityCBW.setTitleView(getString(R.string.totes_abilities_label));
   totesAbilityCBW.setOnClickListener(this);
   noodlesAbilityCBW = new CheckBoxWidget(this);
   noodlesAbilityCBW.setTitleView(getString(R.string.noodles_abilities_label));
   noodlesAbilityCBW.setOnClickListener(this);
   shiftingAbilityCBW = new CheckBoxWidget(this);
   shiftingAbilityCBW.setTitleView(getString(R.string.shifting_abilities_label));
   shiftingAbilityCBW.setOnClickListener(this);
   coopAbilityCBW = new CheckBoxWidget(this);
   coopAbilityCBW.setTitleView(getString(R.string.coop_abilities_label));
   coopAbilityCBW.setOnClickListener(this);
   abilitiesList.addView(containersAbilityCBW);
   abilitiesList.addView(totesAbilityCBW);
   abilitiesList.addView(noodlesAbilityCBW);
   abilitiesList.addView(shiftingAbilityCBW);
   abilitiesList.addView(coopAbilityCBW);
 }
Пример #3
0
 private void initTeleCBWs() {
   teleList = (LinearLayout) findViewById(R.id.tele_list);
   wideTeleCBW = new CheckBoxWidget(this);
   wideTeleCBW.setTitleView(getString(R.string.wide_tele_label));
   wideTeleCBW.setOnClickListener(this);
   teleList.addView(wideTeleCBW);
   narrowTeleCBW = new CheckBoxWidget(this);
   narrowTeleCBW.setTitleView(getString(R.string.narrow_tele_label));
   narrowTeleCBW.setOnClickListener(this);
   teleList.addView(narrowTeleCBW);
   stepTeleCBW = new CheckBoxWidget(this);
   stepTeleCBW.setTitleView(getString(R.string.step_tele_label));
   stepTeleCBW.setOnClickListener(this);
   teleList.addView(stepTeleCBW);
   landfillTeleCBW = new CheckBoxWidget(this);
   landfillTeleCBW.setTitleView(getString(R.string.landfill_tele_label));
   landfillTeleCBW.setOnClickListener(this);
   teleList.addView(landfillTeleCBW);
   humanPlayerTeleCBW = new CheckBoxWidget(this);
   humanPlayerTeleCBW.setTitleView(getString(R.string.tote_chute_tele_label));
   humanPlayerTeleCBW.setOnClickListener(this);
   teleList.addView(humanPlayerTeleCBW);
 }
Пример #4
0
 private void initCBWs(View v) {
   autoList = (LinearLayout) v.findViewById(R.id.auto_match_list);
   autoZoneCBW = new CheckBoxWidget(getActivity());
   autoZoneCBW.setTitleView(getString(R.string.auto_zone_match_label));
   autoZoneCBW.setOnClickListener(this);
   autoList.addView(autoZoneCBW);
   stackedTotesCBW = new CheckBoxWidget(getActivity());
   stackedTotesCBW.setTitleView(getString(R.string.totes_auto_label));
   stackedTotesCBW.setOnClickListener(this);
   autoList.addView(stackedTotesCBW);
   workedCBW = new CheckBoxWidget(getActivity());
   workedCBW.setTitleView(getString(R.string.program_auto_worked));
   workedCBW.setOnClickListener(this);
   autoList.addView(workedCBW);
   teleList = (LinearLayout) v.findViewById(R.id.tele_list);
   functionalCBW = new CheckBoxWidget(getActivity());
   functionalCBW.setTitleView(getString(R.string.functional_tele_match));
   functionalCBW.setOnClickListener(this);
   teleList.addView(functionalCBW);
   coopertitionCBW = new CheckBoxWidget(getActivity());
   coopertitionCBW.setTitleView(getString(R.string.coopertition_tele_match));
   coopertitionCBW.setOnClickListener(this);
   teleList.addView(coopertitionCBW);
 }
Пример #5
0
 private void initAutoCBWs() {
   autoList = (LinearLayout) findViewById(R.id.auto_list);
   autoZoneAutoCBW = new CheckBoxWidget(this);
   autoZoneAutoCBW.setTitleView(getString(R.string.auto_zone_auto_label));
   autoZoneAutoCBW.setOnClickListener(this);
   autoList.addView(autoZoneAutoCBW);
   totesAutoCBW = new CheckBoxWidget(this);
   totesAutoCBW.setTitleView(getString(R.string.totes_auto_label));
   totesAutoCBW.setOnClickListener(this);
   autoList.addView(totesAutoCBW);
   containersAutoCBW = new CheckBoxWidget(this);
   containersAutoCBW.setTitleView(getString(R.string.containers_auto_label));
   containersAutoCBW.setOnClickListener(this);
   autoList.addView(containersAutoCBW);
   flexibleAutoCBW = new CheckBoxWidget(this);
   flexibleAutoCBW.setTitleView(getString(R.string.flexible_auto_label));
   flexibleAutoCBW.setOnClickListener(this);
   autoList.addView(flexibleAutoCBW);
 }
Пример #6
0
 public void onClick(View view) {
   if (view instanceof CheckBoxWidget) {
     CheckBoxWidget checkboxwidget = (CheckBoxWidget) view;
     checkboxwidget.setCheckBox(!checkboxwidget.isChecked());
   }
 }
Пример #7
0
 private void clearFields() {
   autoZoneAutoCBW.setCheckBox(false);
   totesAutoCBW.setCheckBox(false);
   containersAutoCBW.setCheckBox(false);
   flexibleAutoCBW.setCheckBox(false);
   wideTeleCBW.setCheckBox(false);
   narrowTeleCBW.setCheckBox(false);
   stepTeleCBW.setCheckBox(false);
   landfillTeleCBW.setCheckBox(false);
   humanPlayerTeleCBW.setCheckBox(false);
   totesAbilityCBW.setCheckBox(false);
   containersAbilityCBW.setCheckBox(false);
   noodlesAbilityCBW.setCheckBox(false);
   shiftingAbilityCBW.setCheckBox(false);
   coopAbilityCBW.setCheckBox(false);
   driveSpinner.setSelection(0);
   wheelTypeSpinner.setSelection(0);
   wheelNumSpinner.setSelection(0);
   cimNumSpinner.setSelection(0);
   highestPossibleStackSpinner.setSelection(0);
   maxSpeed.setSelection(0);
   teamNumber.setText("");
   // scrollView.scrollTo(0, 0);
 }