开发者

How to use android.R.layout?

开发者 https://www.devze.com 2023-02-17 16:38 出处:网络
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

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? 开发者_JAVA百科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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号