title: GridView child element not detecting ClickEvent
body: <p>I have a GridView Which has two childs</p>
  
  <p>1)CheckBox
  2)ImageView</p>
  
  <p>I use ViewHolder and Inflate My Custom GridView,,While Touching Checkbox it gets Checked and unchecked,But when i Click ImageView its not at all detecing any click,please help me,,,The code is</p>
  
  <p>galleryitem.xml(CustomGridView)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
      &lt;ImageView
          android:id="@+id/thumbImage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"/&gt;
  
      &lt;CheckBox
          android:id="@+id/itemCheckBox"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_alignParentTop="true"
          android:focusable="false"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>multiselectorgrid.xml (MyGridViewActivity)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="@color/kshheadercolor" &gt;
  
      &lt;include
          android:id="@+id/include1"
          android:layout_width="match_parent"
          android:layout_height="60dp"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          layout="@layout/ksh_header_logo" &gt;
      &lt;/include&gt;
  
      &lt;GridView
          android:id="@+id/PhoneImageGrid"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_above="@+id/selectBtn"
          android:layout_below="@+id/include1"
          android:columnWidth="90dp"
          android:gravity="center"
          android:layout_marginTop="5dp"
          android:horizontalSpacing="10dp"
          android:numColumns="auto_fit"
          android:stretchMode="columnWidth"
          android:verticalSpacing="10dp" /&gt;
  
      &lt;Button
          android:id="@+id/selectBtn"        
          android:layout_width="wrap_content"
          android:layout_height="40dp"
          android:layout_marginLeft="10dp"
          android:layout_marginBottom="10dp"
          android:layout_alignParentBottom="true"
          android:layout_alignParentLeft="true"
          android:background="@drawable/blue_button"
          android:text="@string/back"
          android:textSize="15sp" /&gt;
  
      &lt;Button
          android:id="@+id/btn_ksh_back"
          android:layout_width="wrap_content"
          android:layout_marginRight="10dp"
          android:layout_marginBottom="10dp"
          android:layout_height="40dp"        
          android:layout_alignParentBottom="true"
          android:layout_alignParentRight="true"
          android:background="@drawable/blue_button"
          android:text="@string/ok"
          android:textSize="15sp" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>MyCustom adapter</p>
  
  <pre><code>public class ImageAdapter extends BaseAdapter {
          private LayoutInflater mInflater;
  
          public ImageAdapter() {
              mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          }
  
          public int getCount() {
              return count;
          }
  
          public Object getItem(int position) {
              return position;
          }
  
          public long getItemId(int position) {
              return position;
          }
  
      /*  public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position,
                                      long id) {
              System.out.println("ItemClicked----&gt;");
              RelativeLayout item_view = (RelativeLayout)v;
              CheckBox itemcheck = (CheckBox)item_view.findViewById(R.id.itemCheckBox);
              ImageView imageview = (ImageView) item_view.findViewById(R.id.thumbImage);
              itemcheck.setFocusable(false);
              imageview.setFocusable(false);
              int id1 = itemcheck.getId();
              if (thumbnailsselection[id1]){
                  itemcheck.setChecked(false);
                  thumbnailsselection[id1] = false;
              } else {
                  itemcheck.setChecked(true);
                  thumbnailsselection[id1] = true;
              }
           };*/
  
          public View getView(int position, View convertView, ViewGroup parent) {
  
              ViewHolder holder;
              if (convertView == null) {
                  holder = new ViewHolder();
                  convertView = mInflater.inflate(R.layout.galleryitem, null);
                  holder.imageview = (ImageView) convertView.findViewById(R.id.thumbImage);
                  holder.checkbox = (CheckBox) convertView.findViewById(R.id.itemCheckBox);
                  Typeface font = mGlobals.getTypeFace(MultiImageChooserActivity.this, mCurrentLocale);
                  if(font != null)
                  {
                      holder.checkbox.setTypeface(font);
                  }
                  convertView.setTag(holder);
              }
              else {
                  holder = (ViewHolder) convertView.getTag();
              }
              holder.checkbox.setId(position);
              holder.imageview.setId(position);
              holder.checkbox.setOnClickListener(new OnClickListener() {
  
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                      CheckBox cb = (CheckBox) v;
                      int id = cb.getId();
                      if (thumbnailsselection[id]){
                          cb.setChecked(false);
                          thumbnailsselection[id] = false;
                      } else {
                          cb.setChecked(true);
                          thumbnailsselection[id] = true;
                      }
                  }
              });
  
              holder.imageview.setOnClickListener(new OnClickListener() {
  
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                      int id = v.getId();
                      Intent intent = new Intent();
                      intent.setAction(Intent.ACTION_VIEW);
                      intent.setDataAndType(Uri.parse(getString(R.string.file_path) + arrPath[id]), getString(R.string.mime_type_all));
                      startActivity(intent);
                      System.out.println("ItemClicked----&gt;");
                  }
              });
              holder.imageview.setImageBitmap(thumbnails[position]);
              holder.checkbox.setChecked(thumbnailsselection[position]);
              holder.id = position;
              return convertView;
          }
      }
      class ViewHolder {
          ImageView imageview;
          CheckBox checkbox;
          int id;
      }
  </code></pre>