issue with select Check-box item
<p>i am developing an app in which i need to set <code>checkbox</code> on <code>custome listview</code> and when i click on it, <code>boolean</code> arry will fill as per selection. now problem is when i click on first item it get store in array but when i scroll the <code>listview</code> and select next item i get display from position first, second or third. so i guess may be its problem of position and i have cross check with position so. i get </p>

<p><code>0 when first item is select</code>,<br>
<code>get 1 when second item where selected</code><br>
`but get 0 or 1 or 2 at next forth or rest item.</p>

<p>so i found that there are something wrong with getview that not getting position correctly when i click so please help me out this.</p>

<p><strong>Here is CustomeAdapter ::</strong> </p>

<pre><code>class RatingAdapter extends ArrayAdapter&lt;RowModel&gt; {
        private ArrayList&lt;Model&gt; mlist;
        boolean[] checkBoxState;
        RatingAdapter(ArrayList&lt;RowModel&gt; list, ArrayList&lt;Model&gt; mlist) {
            super(Favorites.this, R.layout.outbox_list_item,
                    R.id.txvxFavrowiconappname, list);
            checkBoxState=new boolean[list.size()];
            this.mlist = mlist;
        }

        public View getView(final int position, View convertView,
                ViewGroup parent) {
            View row = super.getView(position, convertView, parent);
            holder = (ViewHolder) row.getTag();
            if (convertView == null) {
                holder = new ViewHolder(row);
                row.setTag(holder);

                RatingBar.OnRatingBarChangeListener l = new RatingBar.OnRatingBarChangeListener() {
                    public void onRatingChanged(RatingBar ratingBar,
                            float rating, boolean fromTouch) {
                        Integer myPosition = (Integer) ratingBar.getTag();
                        RowModel model = getModel(myPosition);

                        model.rating = rating;
                        rate[position] = rating;

                    }
                };
                holder.chkbxFavrowsel
                        .setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
                            @Override
                            public void onCheckedChanged(
                                    CompoundButton buttonView, boolean isChecked) {
                                Model element = (Model) holder.chkbxFavrowsel
                                        .getTag();
                                element.setSelected(buttonView.isChecked());
                                bSelected[position] = isChecked;
                                element.setsizeInc(sizeincrement);
                                if (holder.chkbxFavrowsel.isChecked() == true) {
                                    ShrdDatasource.createComment(
                                            alAppName.get(position).toString(),
                                            "https://play.google.com/store/apps/details?id="
                                                    + alPackagenm.get(position)
                                                            .toString(),
                                            String.valueOf(rate[position]));
                                }
                                Log.i(TAG, "Check Position is " + position);
                            }
                        });
                holder.chkbxFavrowsel.setTag(mlist.get(position));
                holder.ratingBar1.setOnRatingBarChangeListener(l);
            } else {
                row = convertView;
                ((ViewHolder) row.getTag()).chkbxFavrowsel.setTag(mlist
                        .get(position));
            }

            RowModel model = getModel(position);
            ViewHolder holder = (ViewHolder) row.getTag();
            holder.ratingBar1.setTag(new Integer(position));
            holder.ratingBar1.setRating(model.rating);
            holder.imgvFavrowiconappicon.setImageDrawable(alIcon[position]);
            holder.txvxFavrowiconappname.setText(alAppName.get(position)
                    .toString());
            holder.chkbxFavrowsel.setChecked(mlist.get(position).isSelected());

            return (row);
        }
    }
</code></pre>
