Code example for CheckBox

Methods: setOnClickListenersetChecked

0
			checkBox.setId(position);
		} 
		public void setData(CompositeDataHolder compositeDataHolder) {
			final GridDataHolder dataHolder = (GridDataHolder)compositeDataHolder;
			imageView.setImageBitmap(dataHolder.bitmap);
			checkBox.setChecked(dataHolder.selected);
			checkBox.setOnClickListener(new OnClickListener() {
				public void onClick(View v) {
					dataHolder.selected = !dataHolder.selected;
				} 
			}); 
		} 
	} 
	class ListDataHolder implements CompositeDataHolder { 
		Bitmap bitmap;
		Uri uri;
		 
		ListDataHolder(Bitmap b, Uri u) { bitmap = b; uri = u; }
		public CompositeViewHolder createCompositeViewHolder() { return new ListViewHolder(); } 
	} 
Stop searching for code, let great code find you!  Add Codota to your java IDE