Hello..,  I have a problem  try to load a Spinner depending on the 
selection of another.
This is the error that I can not solve ---> The constructor ArrayAdapter 
<String> (new AdapterView.OnItemSelectedListener () {}, int, String []) is 
undefined

The red part of the code is where the error is generated by Eclipse.

*   spPaises.setAdapter(adaptador1);*
*
*
* spPaises.setOnItemSelectedListener(*
*             new AdapterView.OnItemSelectedListener() {*
*              *
*             public void onItemSelected(AdapterView<?> parent,*
*                 android.view.View v, int position, long id) {*
*        *
*                 idPais=obtIdPais(ListaPaises[position],BdWorld); *
*                 ListaCiudades=obtListaDeCiudades(BdWorld,idPais);*
*                 ArrayAdapter<String> adaptador2 =new 
ArrayAdapter<String>(null,android.R.layout.simple_spinner_item, 
ListaCiudades);   *
*             
 
adaptador2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
*
*              spCiudades.setAdapter(adaptador2); *

*             }*
*    **            public void onNothingSelected(AdapterView<?> parent) {*
*                // Mensaje.setText("");*
*             }*
*             *
*     });*

Regards.

-- 
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

Reply via email to