@Justin Anderson: Thanks. I 'd already solved the issue and it was the same
way you mentioned.
On Sat, Apr 2, 2011 at 1:33 PM, Justin Anderson <[email protected]>wrote:

> You are suffering from a case of view recycling.  You have to keep track of
> the checked views on your own and set the checked state of the checkbox in
> your adapter's getView() method.
>
> If you search Google for Android View Recycling you should be able to find
> several examples of how to do this.
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Fri, Apr 1, 2011 at 2:52 AM, droid_gal <[email protected]> wrote:
>
>> Dear all,
>>
>> I have a problem with my adapter that extends BaseAdapter
>> That is to inflate the listview's rows with a text view and a
>> checkbox.
>> The size of the listview is of 20 after binding and have to scroll to
>> see all the items.
>> When I checked a checkbox, says it's from the 1st row, it's also
>> checked the 11th checkbox automatically.
>> When I unchecked the 1st one, then the 11th also is unchecked.
>> I tried for different rows and I found out that it automatically
>> checks/unchecks the checkbox with difference of 10 from the checked/
>> unchecked one.
>>
>> This is the layout xml file content for individual row:
>> <FrameLayout
>>  xmlns:android="http://schemas.android.com/apk/res/android";
>>  android:layout_width="match_parent"
>>  android:layout_height="match_parent"
>>
>>  >
>>  <TextView android:id="@+id/tvRow"
>>        android:textSize="16sp"
>>        android:textStyle="bold"
>>        android:layout_width="fill_parent"
>>        android:layout_height="40dp"
>>        android:gravity="center_vertical|center_horizontal"/>
>>
>>        <CheckBox android:id="@+id/chkRow"
>>                android:layout_width="40dp"
>>                android:layout_height="40dp"
>>                android:layout_gravity="right"
>>                android:background="@null"
>>        />
>>  </FrameLayout>
>>
>> Thanks in advance for any input to this issue.
>>
>> --
>> 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
>
>
>  --
> 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

-- 
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

Reply via email to