Hi,
somebody knows why when nothing is selected on the list LIST the
variable TextView ADNAME doesn't set the text "toto" in the code
above? But the first String in position 0 of the String[]name?

Why this code works only when a row of the list is selected?

LIST.setOnItemSelectedListener (new OnItemSelectedListener() {
             public void onItemSelected(
                     AdapterView<?> parent, View view, int position,
long id) {

                String[] name= mStrings.get(position);

                        ADNAME.setText(name[1].toString());

             }

             public void onNothingSelected(AdapterView<?> parent) {

               ADNAME.setText("toto");
             }
         });

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

Reply via email to