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. Anybody can tell me where is the source code for software mp4 decoder in android?


Can anyone  tell me where is the source code  for software mp4 decoder
in android? I mean run in emulator.

Thanks a lot in advance.


2. Loading OMA1 sample CPM plugin


I am trying to understand how and when a CPM plugin gets loaded.  I
have created an image with PVLOGGING=1, wrote a simple app to create a
MediaPlayer instance on the emulator, and am viewing logs through
LogCat on Eclipse.  LogCat shows that pvplayer.cfg is parsed and
several shared object files are loaded, but there are no entries for
any CPM plugins.  From the code samples it seems that
PvmfOma1PassthruPluginPopulator should create

Could somebody please explain how a CPM plugin is loaded?  Is it after
a splitter node recognizes that a file is DRM-protected, or when the
media player starts up, or at some other time?



3. dropdownlist doesn't work if only one character is in AutoCompleteTextView

4. Player keeps on playing media file

5. Removing TelephonyManager listener - Help please.

6. Device firmware update

7. How to find an Android developer?