title: Wrong Checkbox selection in Android?
body: <p>In my Apps, I am selecting the Items to Order. My Problem here is If I check the Checkbox to Order even another Checkbox is also has been checked. Means If I select single Item , two Items are getting checked.</p>
  
  <p>And starting for 5 Items it is checked correctly and displaying in the Ordering page. From 6th Item If I select It is displaying some other Items in the Ordering page. </p>
  
  <p>Here is my Code of the List:</p>
  
  <pre><code>    public View getView(final int position, View convertView, ViewGroup parent) {
          View view = convertView;
          final ViewHolder viewHolder;
          if (view == null) {         
                view = inflater.inflate(R.layout.appetiserlistview, null);
              viewHolder = new ViewHolder();
              viewHolder.image=(ImageView)view.findViewById(R.id.appetiserimage);
              viewHolder.text = (TextView) view.findViewById(R.id.appetisertext);
              viewHolder.desc=(TextView)view.findViewById(R.id.appetiserdesc);
              viewHolder.price=(TextView)view.findViewById(R.id.appetiserprice);
              viewHolder.checkbox = (CheckBox) view.findViewById(R.id.bcheck);
  
  
              view.setTag(viewHolder);
          } else {
              viewHolder = (ViewHolder) view.getTag();
          }
  
  
  
  
  
  
          viewHolder.image.setImageBitmap(bmps[position]);
  
          viewHolder.price.setText(prices[position]);
          viewHolder.desc.setText(descs[position]);
          viewHolder.checkbox.setTag(itemnames[position]);
          ViewHolder holder = (ViewHolder) view.getTag();
          holder.text.setText(itemnames[position]);
          viewHolder.checkbox.setOnClickListener(new OnClickListener() {
  
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  if (((CheckBox) v).isChecked())
                  {
                      arr.add(itemnames[position]);
                      itemprice.add(prices[position]);
                         image.add(bmps[position]);
  
  
                  }
  </code></pre>