android - Checkbox not clickable in simple listview -


i have simple listview (not custom listview) checkbox in right side these checkboxes not clickable.

here mainactivity.java code:

setlistadapter(new arrayadapter<string>(this, android.r.layout.simple_list_item_multiple_choice, getresources().getstringarray(r.array.myarray))); 

and here xml code:

 <listview         android:id="@android:id/list"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_alignparentleft="true"         android:layout_alignparenttop="true"          >     </listview> 

also need find out checkbox clicked on click of button.

i have seen may questions posted on stackoverflow realeated custom listview.

listview.setchoicemode(listview.choice_mode_multiple); listview.setlistadapter(new arrayadapter<string>(this, android.r.layout.simple_list_item_checked, getresources().getstringarray(r.array.myarray))); 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -