/** * Called when the show all displays checkbox is toggled or when * an item in the list of displays is checked or unchecked. */ @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (buttonView == mShowAllDisplaysCheckbox) { // Show all displays checkbox was toggled. mDisplayListAdapter.updateContents(); } else { // Display item checkbox was toggled. final Display display = (Display)buttonView.getTag(); if (isChecked) { PresentationContents contents = new PresentationContents(getNextPhoto()); showPresentation(display, contents); } else { hidePresentation(display); } } }
/** * Called when the show all displays checkbox is toggled or when * an item in the list of displays is checked or unchecked. */ @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (buttonView == mShowAllDisplaysCheckbox) { // Show all displays checkbox was toggled. mDisplayListAdapter.updateContents(); } else { // Display item checkbox was toggled. final Display display = (Display)buttonView.getTag(); if (isChecked) { DemoPresentationContents contents = new DemoPresentationContents(getNextPhoto()); showPresentation(display, contents); } else { hidePresentation(display); } mDisplayListAdapter.updateContents(); } }