> And as for my last inquiry :) - (I have also tried switching in
> listAdapter = new ArrayAdapter<String> (....); from
> android.R.layout.simple_expandable_list_item_1 to
> android.R.layout.simple_list_item_1) - the Lisview (containing 2
> items) properly displays those 2 strings on the first and second line,
> and afterwards comes a some other ~100 TextViews all displaying the
> string "null". Wanna take another guess ? Your good at this :D

My guess is that the ArrayAdapter is not liking your array for some
reason. The code snippets you have supplied don't show how you are
declaring it.

If the list is going to be static, I recommend you just go ahead and
populate at it at declaration time, like this:

String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
                "consectetuer", "adipiscing", "elit", "morbi", "vel",
                "ligula", "vitae", "arcu", "aliquet", "mollis",
                "etiam", "vel", "erat", "placerat", "ante",
                "porttitor", "sodales", "pellentesque", "augue", "purus"};

In your case, there would only be two strings in the comma-delimited list
between the braces.

If the list is going to change, I recommend you use ArrayList rather than
a Java array, since the collection classes are easier and safer to
manipulate.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ -- Available Now!



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to