title: returning incorrect position in getView method
body: <p>I am using CustomGridAdapter which extends BAseAdapter to display the values of array in a listview. but in the getView of the CustomGridAdapter the position of the array values is not in a flow.</p>
  
  <pre><code>public class CustomGridAdapter extends BaseAdapter {
  
      private Context context; 
      private final String[] gridValues;
      private final String[] gridImage;
  
      //Constructor to initialize values
      public CustomGridAdapter(Context context, String[] gridValues, String[] gridImage) {
          this.context = context;
          this.gridValues = gridValues;
          this.gridImage=gridImage;
      }
  
      @Override
      public int getCount() {
  
          // Number of times getView method call depends upon gridValues.length
          return gridValues.length;
      }
  
      @Override
      public Object getItem(int position) {
  
          return gridValues[position];
      }
  
      @Override
      public long getItemId(int position) {
  
          return 0;
      }
  
  
      // Number of times getView method call depends upon gridValues.length
  
      public View getView(int position, View convertView, ViewGroup parent) {
  
          //LayoutInflator to call external grid_item.xml file
  
          LayoutInflater inflater = (LayoutInflater) context
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
          View gridView;
  
          if (convertView == null) {
  
              gridView = new View(context);
  
              // get layout from grid_item.xml
              gridView = inflater.inflate(R.layout.grid_item, null);
  
              // set value into textview
  
              TextView textView = (TextView) gridView.findViewById(R.id.grid_item_label);
              textView.setText(gridValues[position]);
              Log.i(new Integer(position).toString(),gridValues[position] );
              ImageView grp_icon=(ImageView)gridView.findViewById(R.id.grid_item_image);
              BitmapFactory.Options options = new BitmapFactory.Options();
              options.inPreferredConfig = Bitmap.Config.ARGB_8888;
              String path="/sdcard/Letsmeet/letsmeet_media/group_images/"+gridImage[position];
              Bitmap bitmap = BitmapFactory.decodeFile(path, options);
              grp_icon.setImageBitmap(bitmap);
              // set image based on selected text
  
              ImageView imageView = (ImageView) gridView
                      .findViewById(R.id.grid_item_image);
  
              String mobile = gridValues[position];
  
  
  
          } else {
              gridView = (View) convertView;
          }
  
          return gridView;
      }
  }
  </code></pre>
  
  <p>In the getView method of the customGridAdapter the postion is in order of 0,1,2,0,4 Why I am getting 0 after 2 instead of 3?</p>