Code example for CheckBox

Methods: setId

0
			imageView = (ImageView)view.findViewById(R.id.imageView);
			checkBox = (CheckBox)view.findViewById(R.id.checkBox);
		} 
		public void setId(int position) {
			imageView.setId(position);
			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;