title: How to select multiple images in GridView?
body: <p>Here is the grid view main page...
  setting custom Adapter on GridView...
  All the stuff is working correctly but i want to select multiple images...</p>
  
  <pre><code>gridview=(GridView)findViewById(R.id.gridview_robot_ghost);
      gridview.setAdapter(new customGridAdapter(this, GHOST_NUMBER));
  
      gridview.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position,
                  long id) {
              Toast.makeText(getApplicationContext(), "Your Verification is Succeesfull "+ "\n Selected Ghost Position is "+position, Toast.LENGTH_LONG).show();
  
          }
  
      });
  </code></pre>
  
  <p>custom grid adapter:</p>
  
  <pre><code>customGridAdapter extends BaseAdapter{
      private Context context;
  
      private final String[] grid_values;
  
      public customGridAdapter(Context context,String[] grid_values)
      {
          this.context=context;
          this.grid_values=grid_values;
      }
      @Override
      public int getCount() {
          // TODO Auto-generated method stub
          return grid_values.length;
      }
  
      @Override
      public Object getItem(int position) {
          // TODO Auto-generated method stub
          return null;
      }
  
      @Override
      public long getItemId(int position) {
      // TODO Auto-generated method stub
          return 0;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
  
  
          LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View gridView;
  
          if(convertView==null)
          {
              gridView=new View(context);
              gridView=inflater.inflate(R.layout.grid_item, null);
              ImageView imageView = (ImageView)     gridView.findViewById(R.id.grid_item_image);
              String ghost=grid_values[position];
  
                  if (ghost.equals("Ghost1")) {
  
                  imageView.setImageResource(R.drawable.ghost4);
  
              } else if (ghost.equals("Ghost2")) {
  
                  imageView.setImageResource(R.drawable.ghost4);
  
              } else if (ghost.equals("Ghost3")) {
  
                  imageView.setImageResource(R.drawable.ghost3);
  
              } else {
  
                  imageView.setImageResource(R.drawable.ghost4);
              }
  
          } else {
              gridView = (View) convertView;
          }
  
          return gridView;
      }
  </code></pre>