Checkboxes selected gets changed

joanparis

New Member
I am having a list view in my Android application which has a button for Approve & Reject the record. When I select few check boxes in the list & then press the sliding drawer to open, the selected check boxes gets changed.... When I select only the 1st check box & press the sliding drawer the last check box in the list gets checked & when I close the sliding drawer the 1st check box gets checked....This is the pattern followed... Please help any suggestions on what could be the reason.....\[code\]<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical" ><FrameLayout android:id="@+id/frameLayout1" android:layout_width="match_parent" android:layout_height="32dp" > <Button android:id="@+id/back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android:text="Back" android:textSize="12dp" android:textStyle="bold"/> <TextView android:id="@+id/heading" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#ffa500" android:textSize="18dp" android:textStyle="bold" /> <Button android:id="@+id/markall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:clickable="true" android:text="Mark All" android:textSize="12dp" android:textStyle="bold"/></FrameLayout><ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/line" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingBottom="2dp" android:paddingLeft="5dp" android:paddingRight="5dp" android:paddingTop="2dp" android:scaleType="fitXY" android:src="http://stackoverflow.com/questions/10883804/@android:drawable/divider_horizontal_dark" /><AutoCompleteTextView android:id="@+id/search" android:layout_width="match_parent" android:layout_height="31dp" android:hint="Search" android:textSize="11dp" > <requestFocus /></AutoCompleteTextView><ListView android:id="@+id/android:list" android:layout_width="match_parent" android:layout_height="311dp" android:layout_weight="1.85" ></ListView><LinearLayout android:id="@+id/rl" android:layout_width="match_parent" android:layout_height="105dp" android:gravity="bottom" android:visibility="gone"> <SlidingDrawer android:id="@+id/slidingDrawer" android:layout_width="165dp" android:layout_height="wrap_content" android:layout_marginLeft="80dp" android:content="@+id/content" android:handle="@+id/handle" android:orientation="vertical"> <Button android:id="@+id/handle" android:layout_width="30dp" android:layout_height="13dp" android:background="@drawable/uparrow" android:gravity="bottom"/> <LinearLayout android:id="@+id/content" android:layout_width="165dp" android:layout_height="116dp" android:gravity="center" android:orientation="vertical"> <ImageView android:id="@+id/approve" android:layout_width="150dp" android:layout_height="34dp" android:layout_gravity="center" android:src="http://stackoverflow.com/questions/10883804/@drawable/appr_button" android:minWidth="150dp"/> <ImageView android:id="@+id/reject" android:layout_width="150dp" android:layout_height="34dp" android:src="http://stackoverflow.com/questions/10883804/@drawable/rej_button" android:layout_gravity="center" android:minWidth="150dp"/> </LinearLayout> </SlidingDrawer> </LinearLayout><FrameLayout android:id="@+id/frameLayout2" android:layout_width="match_parent" android:layout_height="wrap_content" > <Button android:id="@+id/handle2" android:layout_width="30dp" android:layout_height="13dp" android:layout_gravity="center" android:background="@drawable/uparrow" android:gravity="bottom" /></FrameLayout>\[/code\]
 
Back
Top