atom feed5 messages in com.googlegroups.android-beginners[android-beginners] Re: WTF! My dialo...
FromSent OnAttachments
Ben WilliamsonFeb 16, 2009 6:03 pm 
Ben WilliamsonFeb 16, 2009 6:09 pm 
Ben WilliamsonFeb 16, 2009 6:20 pm 
Romain GuyFeb 16, 2009 6:56 pm 
Ben WilliamsonFeb 17, 2009 5:24 am 
Subject:[android-beginners] Re: WTF! My dialog multichoice items have white text on white list background!
From:Ben Williamson (tek.@gmail.com)
Date:Feb 16, 2009 6:09:52 pm
List:com.googlegroups.android-beginners

Ben Williamson wrote:

I've been beating my head against the wall on this one for a minute now... did I find another bug like the list selector solid color one?

When I set multichoice items for a dialog as seen below my list items have white background and white text, when I click or select an item I can see the text becomes black and the orange list selector shows as expected.... anyone know what's up?

AlertDialog.Builder diag = new AlertDialog.Builder(BookmarkEditActivity.this); diag.setTitle("Select Labels"); String[] arrLabelsChar = new String[arrLabels.size()]; boolean[] arrSelectedLabels = new boolean[arrLabels.size()]; for (int i = 0; i < arrLabels.size(); i++) { arrLabelsChar[i] = arrLabels.get(i); if (hashLabels.containsKey(arrLabels.get(i))) arrSelectedLabels[i] = true; else arrSelectedLabels[i] = false; }

Log.v("SoBook", "Multi Choice Items: " + arrLabelsChar[0]); Log.v("SoBook", "Selected items: " + arrSelectedLabels[0]);

diag.setMultiChoiceItems(arrLabelsChar, arrSelectedLabels, null); diag.setNegativeButton("Cancel", null); diag.setPositiveButton("OK", null); diag.show();

HAHAHA I did, I did see a puddy tat! Found my second bug here people >:|

Switch my activity theme to black (from white) and now my text is visible. Maybe this is fixed in sdk 1.1.... I should upgrade.