title: setonitemclicklistener not working for gridview
body: <p>Here's My Code the code, I'm not getting any response from gridview setOnClickListener.
  Please Help me out.</p>
  
  <pre><code>setContentView(R.layout.myfav);
  gView = (GridView) findViewById(R.id.grid);
  PackageManager pm = this.getPackageManager();
      context = MyFav.this;
      Intent intent = new Intent(Intent.ACTION_MAIN, null);
      intent.addCategory(Intent.CATEGORY_LAUNCHER);
      list = pm.queryIntentActivities(intent, PackageManager.GET_META_DATA);
      gView.setAdapter(new MyAdapter());
      // save.setOnClickListener(this);
      // cancel.setOnClickListener(this);
      gView.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
                  long arg3) {
              // TODO Auto-generated method stub
              Log.e("inside click", "" + arg2);
              Toast.makeText(getApplicationContext(), "Hello" + arg2,
                      Toast.LENGTH_SHORT).show();
          }
      });
  </code></pre>
  
  <p>This is my Grid view</p>
  
  <pre><code>&lt;GridView
      android:id="@+id/grid"
      android:layout_width="match_parent"
      android:layout_height="400dp"
      android:layout_centerHorizontal="true"
      android:numColumns="3"
      android:stretchMode="columnWidth" &gt;
  &lt;/GridView&gt;
  </code></pre>