Code example for View.OnClickListener

Methods: onClick

0
        	convertView = inf.inflate(viewId, null); 
        	if (clickListener != null) { 
	        	final View ccv = convertView;//.findViewById(R.id.profile_image); 
	        	ccv.setOnClickListener(new OnClickListener() { 
					@Override public void onClick(View v) { 
						clickListener.onClick(ccv); 
					} 
				}); 
        	} 
        	//imageView = new ImageView(mContext); 
            //imageView.setLayoutParams(new GridView.LayoutParams(145, 145)); 
            //imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); 
            //imageView.setPadding(8, 8, 8, 8); 
        } 
        imageView = (ImageView) convertView.findViewById(R.id.profile_image); 
         
        ((TextView) convertView.findViewById(R.id.caption)).setText(mPics[position].caption); 
        convertView.setTag(mPics[position]); 
         
/* 
		Drawable toRecycle= imageView.getDrawable();