Arayadapter only shows text when highlighted

by Android_n00b » Fri, 18 Sep 2009 08:47:50 GMT

Sponsored Links
 I have an arrayadapter which stores the names of the 12 months of the
final String[] Months = new String[]
ArrayAdapter<String> monthArray = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, Months);

I also have a textview where if I enter some text, the matching text
in the arrayadapter appears below the textbox.
final AutoCompleteTextView textView = (AutoCompleteTextView)

For example, if I start typing the characters of January, I should see
the word January appear below the textbox (like how google suggest
works). So my program seems to be working, but when I start typing Jan
for example, a box appears below with the word January in it, but I
can only see the text when it is highlighted. So for some reason, the
text is the same colour as the background box(white in this case).
Anyone know why this is happening?



Arayadapter only shows text when highlighted

by Mark Murphy » Fri, 18 Sep 2009 17:26:46 GMT


What layout are you using for the ArrayAdapter used for the

ArrayAdapter adapter = new ArrayAdapter(this,
            android.R.layout.simple_dropdown_item_1line, COUNTRIES);

If you do not wish to use android.R.layout.simple_dropdown_item_1line,
that is fine, but you will need to then adjust your own custom layout to
have the right color scheme for drop-down lists.

Mark Murphy (a Commons Guy)  | 

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.1 Available!


Sponsored Links

Other Threads

1. How to use a CSR Wi-Fi Chip in Android?

How to use a CSR Wi-Fi Chip in Android?


Unifi Drivers for the compilation process, how to?

I will wait for your answer. Thanks.


2. Visual Voice mail

Hi ,

I want to develope Visual voice mail application. is there any spec to
follow up like  3gpp for messagging.

Please guide me if any body have any idea . how i can start the
implementation of this app.



3. Dynamic Widget Size

4. Change minWidth/minHeight AppWidget

5. Rado's Colorthon Tutorial Now Available on YouTube

6. Thread is stopping alone...

7. Android Developer Challenge