0

In my mobile application i am extending ListActivity at one point. i want to have each of the list items to have a textview and a checkbox. i do not want to use custom layout. How do i use the default android layouts and achieve the same? The entries for the text view at stored in an Array so i am using SimpleArrayAdapter. i can also use SimpleCursorAdapter if need be.

thank you in advance.

1
  • 1
    Hey some code of where you have got up to so far would engage more people to help Commented Mar 16, 2011 at 11:20

1 Answer 1

1

you can use android.R.layout.simple_list_item_multiple_choice for layout id.

this will give you a check box and your desired string from the adapter in all the list items.

Sign up to request clarification or add additional context in comments.

2 Comments

but how do i get list of all the items the user has clicked?
could you also give me the code for setting the adapter for the listview, i mean i need to set the id of the textbox in android.R.layout.simple_list_item_multiple_choice which will be allocated the values from my array.....

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.