> Sorry, I dont know how to format it.
Whatever you did helped a bunch, thanks!
> listAdapter = new ArrayAdapter<String> (getContext(),
> android.R.layout.simple_expandable_list_item_1, participants);
You are attempting to use an ExpandableListView layout with a plain
ListView. Try using android.R.layout.simple_list_item_1 instead.
> participantList = new ListView (getContext());
> LinearLayout.LayoutParams params = new LinearLayout.LayoutParams
> (1, 0x77);
> participantList.setLayoutParams(params);
I think you are setting the width of your ListView to be 1px. The two-int
constructor is public LinearLayout.LayoutParams(int w, int h), and I am
guessing that w and h are width and height in pixels.
You might consider putting both your ListView and the LinearLayout parent
in the activity's layout XML file, like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
/>
</LinearLayout>
You would then use findViewById(android.R.id.list) to get at the ListView
for filling in the adapter. And, obviously, you would need to fix the
android:layout_width and android:layout_height values to match what your
dialog needs.
I haven't played around much with Dialog, so there could be some
ListView-related issues there that I am unaware of.
If this still doesn't clear up your problems, write back with your
then-current Java plus the XML layout(s) you are using.
--
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
-~----------~----~----~----~------~----~------~--~---