Agregar elementos al adaptador simple dinámicamente

I have a very simple question. I'm working on an Android application where I make use of Simple Adapter for ListView. Now I need to append items to this ListView dynamically. I know it is possible to do so in case of Array Adapters.

Se hace de la siguiente manera:


Is there any equivalent for the same in case of Simple Adapters? I couldn't find much relevant links regarding this on the net.

Amablemente ayuda.

Gracias de antemano!

preguntado el 05 de mayo de 13 a las 18:05

1 Respuestas

I think not, but you always can create a new SimpleAdapter y llama setAdapter again with the new adapter.

If you are going to add/remove elements you, probably, need some other adapter not a SimpleAdapter. Because they say in the docs that SimpleAdapter is 'An easy adapter to map datos estáticos to views defined in an XML file'

contestado el 05 de mayo de 13 a las 18:05

Actually, I don't think that you even need to create a new SimpleAdapter in this case - just call setAdapter after the change - GrisBarbudoGeek

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.