When you create the view for the row, you'll also assign a listener to each
of the views. Either create a specific listener for each of them that
unchecks the rest, or re-use the same listener that unchecks everyone and
checks itself.
Don't forget to update your data model accordingly.
On Tuesday, January 22, 2013 9:47:42 PM UTC+2, Abdullah wrote:
>
> i write that code.but i have other problem.i explain for you.checkboxes
> names are chbx_A,chbx_B,chbx_C,chbx_D,chbx_E ok.
> and when i check a check box how can i uncheck others checkbox.only one
> checkbox can be check in same row.
>
> i write code checkbox changestate listener.i handle check change buti
> don't unckeck other checbox :(( how can i get row items and set they in
> the check listener.
>
> please can you help me ?
>
> 22 Ocak 2013 Salı 00:06:39 UTC+2 tarihinde bob yazdı:
>>
>> You should have a class that implements ListAdapter. In that class,
>> there is a method called getView:
>>
>> public View getView(int position, View convertView, ViewGroup parent) {
>>
>>
>> Have it return a View that has a checkbox object with a listener already
>> attached to it.
>>
>>
>>
>>
>> On Sunday, January 20, 2013 12:00:45 PM UTC-6, Abdullah wrote:
>>>
>>> Hi guys,
>>>
>>> i have a custom listview.it has 1 imageview 1 textview and 5 checkbox
>>> each row.
>>>
>>> how can i check or uncheck other checkbox in same row when i check any
>>> checkbox.
>>>
>>> i use below funcktion in arrayadapter but i don't know where i check or
>>> unckeck when i check a checkbox.
>>>
>>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en