Hello Vani,

You need to do the check and ucheck operation in onListItemClick. Check the
below code which helps.

@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
// File newFile = (File) l.getItemAtPosition(position);
CheckedTextView check = (CheckedTextView)v;
check.setChecked(!check.isChecked());
super.onListItemClick(l, v, position, id);
}

Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.


On Wed, Jan 4, 2012 at 6:13 PM, Daniel Drozdzewski <
daniel.drozdzew...@gmail.com> wrote:

> Vani,
>
> Each checkbox has to be a separate object, while it seems like you are
> adding the same checkbox to every list item.
>
> Daniel
>
> On 4 January 2012 12:41, saran vonteddu <saran.myw...@gmail.com> wrote:
> > Hi vani,
> >
> >        Uncheck the other checkboxes, its as simple as it is......
> >
> >
> > regards,
> > Saran
> >
> > On Tue, Nov 8, 2011 at 4:56 PM, NaveenShrivastva
> > <kumarnaveen.si...@gmail.com> wrote:
> >>
> >>
> >>
> http://android-codes-examples.blogspot.com/2011/03/listactivity-with-checkbox-using.html
> >>
> >> On Tue, Nov 8, 2011 at 4:47 PM, vani reddy <vani.reddy.bl...@gmail.com>
> >> wrote:
> >> > Hi,
> >> >
> >> > I have created a custom listview of text and checkbox.
> >> > When i click on a particular checkbox the other checkboxes in the rows
> >> > also
> >> > gets  checked. How to avoid this??
> >> >
> >> > --
> >> > Regards,
> >> > Vani Reddy
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "Android Developers" group.
> >> > To post to this group, send email to
> android-developers@googlegroups.com
> >> > To unsubscribe from this group, send email to
> >> > android-developers+unsubscr...@googlegroups.com
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/android-developers?hl=en
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to
> android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/android-developers?hl=en
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Daniel Drozdzewski
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



--

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to