Hey People,

I am at a loss.  I have tried multiple ways to get this done.  I have
tried setListAdapter also with the same results.  The ListView is always
blank.

What am I doing wrong?

                ListView lvDrinks = 
(ListView)this.findViewById(android.R.id.list);
                
                //View lvDrinks = this.findViewById(android.R.id.list);
                
                String sType = extras.getString("drinktype");
                        //                                      
lvDrinks.setAdapter(new ArrayAdapter<String>(this,
                                        android.R.layout.simple_list_item_1,
                                        R.array.beers));

beerscreen XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android";
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#ffffff"
    android:textColor="#000000"
    >
        <TextView  android:id="@+id/beerselect"
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="@string/selecttxt"
                android:layout_centerHorizontal="true"
            android:textStyle="bold"
                android:textColor="#000000"
            />
    <ListView android:id="@android:id/list" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/beerselect"
        android:background="#aaaaaa"
        android.textColor="ffffff"
        android:choiceMode="singleChoice"/>
        
    <Button android:id="@+id/beeradd"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/addtxt"
        android:layout_below="@android:id/list"
        android:layout_alignParentLeft="true"
        android:layout_marginLeft="10dip"/>
        
    <Button android:id="@+id/beercancel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/canceltxt"
        android:layout_below="@android:id/list"
        android:layout_alignParentRight="true"
        android:layout_marginRight="10dip"/>
        
</RelativeLayout>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to