user590849
user590849

Reputation: 11765

How to use android.R.layout?

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.

Upvotes: 0

Views: 567

Answers (1)

Atmaram
Atmaram

Reputation: 3785

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.

Upvotes: 1

Related Questions