Dear Mark, yes that dis the trick. Thanks! But I'm wondering anyway, what was wrong with my attempt? What is the predefined layout android.R.layout.simple_list_item_single_choice good for if it uses the same color for text and background?
On 22 Jun., 22:31, Mark Murphy <[email protected]> wrote: > On Tue, Jun 22, 2010 at 4:23 PM, maik <[email protected]> wrote: > > I now read all my database values into an array and use > > ArrayAdapter<> to fill the AlertDialog. > > That's not a good idea. You waste a fair bit of memory and CPU time this way. > > > The problem is, the list shows > > the list entries with white text on a white background (only while > > clicking an entry which makes the background orange reveals the text > > of the entry). > > What is my error here? > > Try the setSingleChoiceItems() version that takes a Cursor. This > simultaneously lets you use a built-in layout that works and avoids > copying the data into the ArrayAdapter. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

