checkboxes with list view

Put your problem here if it does not fit any of the other categories.

checkboxes with list view

Postby gsk » Thu Nov 13, 2008 6:41 am


Iam very new to android ...

Iam developing a sample application which needs checkboxes with a listview (I mean I want to display the listview with a checkbox which attached to item in listview)

I did it in normal way like ..... taking a class which extends listactivity. And Overriding the Oncreate();
setting the list adapter.

setListAdapter(new ArrayAdapter<String>this,android.R.layout.simple_list_item_multiple_choice,arraylistitems));

and I am showing the list by following c ode:

final ListView listView = getListView();



Iam gettng the listview with checkboxes..

And toget the status of checked item : Iam using the following code ..


and its working fine for me....

but I didnt understand the suggetions which given in this forum to get the checkbox functionality.
I mean .. should I develop the code as u people suggested..

please tel me ... if anything goes wrong with my code in the future purpose...
Junior Developer
Junior Developer
Posts: 10
Joined: Wed Nov 05, 2008 11:12 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 17 guests