The main thing for making the list view is your XML should contain
this

<ListView android:id="@+id/listView"

      android:layout_width="fill_parent"

      android:layout_height="wrap_content"/>

and now for the code part, try this I call phonebook into my code in form of
list where on the right there is a radio button from which you select an
item and that is being displayed in the spinner.

Just check this it might help

spinner.setOnItemSelectedListener(*new* MyOnItemSelectedListener());

            Cursor cur = getContentResolver().query(People.*CONTENT_URI*, *
null*, *null*, *null*, *null*);

                  SimpleCursorAdapter adapter3 = *new* SimpleCursorAdapter(*
this*,

                              android.R.layout.*simple_spinner_item*,

                              // Use a template

                              // that displays a


                              // text view

                              cur,

                              // Give the cursor to the list adapter

                              *new* String[] {People.*NAME*},

                              // Map the NAME column in the

                              // people database to...

                              *new* *int*[] {android.R.id.*text1*});

                              //    The "text1" view defined in

                              // the XML template


adapter3.setDropDownViewResource(android.R.layout.*
simple_spinner_dropdown_item*);

                              spinner.setAdapter(adapter3);



I hope it might help

you can check the complete code on the link I sent, lets be co-operative its
good for everyone



Thanks & regards

NUBH

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to