Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/05/2012, 14:31
ci2000
 
Fecha de Ingreso: abril-2005
Mensajes: 483
Antigüedad: 19 años
Puntos: 3
Mostrar tabla en AutoCompleteTextView

Hola. Necesito mostrar datos en un AutoCompleteTextView desde una tabla.

Hice:
Código:
Cursor cnuevo = baseMatriculas.rawQuery("SELECT * FROM matriculas ORDER BY matricula",null);
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,android.R.layout.simple_dropdown_item_1line, cnuevo, new String[] {"matricula"}, new int[] {R.id.txtMatricula});

editMatricula = (AutoCompleteTextView) findViewById(R.id.txtMatricula);
editMatricula.setThreshold(1);
editMatricula.setAdapter(adapter);
Así como está planteado me da error.

Estuve leyendo en google que hay que utilizar CursorToStringConverter, tal vez falta esto y por eso me da error.

Desde ya muchas gracias por las respuestas.
Saludos