Keep listview loaded

Good morning, I have a simple application that shows the names of students of a course in a listview, when I choose a student from the listview I go to a second window where I show all the data of the selected student... when I return to screen1 the listview is empty... how do I so that when I return the listview is still loaded with the students of the selected course?

[image]

Abrir en Google Traductor

Comentarios

[

Google Traductor

https://translate.google.com › ...
](https://translate.google.com/?hl=es-419)

El servicio de Google, que se ofrece sin costo, traduce al instante palabras, frases y páginas web del inglés a más de 100 idiomas.

  • [

Traductor de Google

https://translate.google.com › ...
](https://translate.google.com/?hl=es)

El servicio de Google, que se ofrece sin coste económico, traduce al instante palabras, frases y páginas web a más de 100 idiomas.

[

El mejor traductor del mundo - DeepL Translate

https://www.deepl.com › translator-mobile
](DeepL Translate - El mejor traductor del mundo)

Traducciones precisas para particulares (un solo usuario) y equipos de trabajo. ... Combinaciones de idiomas más populares: inglés - español, ...

[

Traductor confiable inglés-español

https://www.ingles.com › traductor
](Traductor inglés español | inglés.com)

Traductor gratis de inglés a español más preciso. Traducción inglés-español fácil. Traduce texto con más de un millón de significados en inglés y español.

[

TRADUCTOR de Cambridge | inglés español

https://dictionary.cambridge.org › es-LA › translate
](TRADUCTOR de Cambridge | inglés español)

Traductor en línea gratuito reforzado con definiciones, pronunciaciones, sinónimos, ejemplos del diccionario y el apoyo de los 19 idiomas más utilizados en ...

[

Traductor | EL MUNDO

https://www.elmundo.es › traductor
](Traductor | EL MUNDO)

Traductor gratuito online en elmundo.es. Traductor de Inglés, italiano, francés y alemán. Traducción de texto y páginas web.

[

Español ↔ Inglés Traductor con EJEMPLOS - Collins Dictionary

https://www.collinsdictionary.com › traductor
](https://www.collinsdictionary.com/es/traductor)

Traducciones GRATUITAS con audio. De español a inglés, de inglés a español, a francés, a alemán, y muchos otros idiomas. Ejemplos de frases, sinónimos y ...

[

Español ⇔ Inglés Traductor - Diccionario PONS

https://es.pons.com › traducción-texto
](Español ⇔ Inglés Traductor | PONS)

Haz servir ahora la traducción de textos gratuita del diccionario PONS! Disponible en 38 idiomas con más de 12 millones de entradas, frases y traducciones.

[

Traducción y diccionario gratis - Reverso

](Reverso | Traducción y diccionario gratis)

Reload/Load the listview with the elements on initialise (you can make this conditional....e.g. set a variable value when switching screens, to avoid this happening when the app opens)

Or do not close Screen1 when going to Screen2, and just closeScreen in Screen2 to return to Screen1 (you are probably opening Screen1 again, which will eventually cause an app crash due to overloaded memory)

When I put a variable to reload the listview when I return from screen 2, I lose the value of this variable, how can I do it?
those are my screen block 1

screen 2

Try this example project

ShowListviewWhenReturn.aia (3.2 KB)

Note, if I remember correctly, when in companion Screen1 initialises regardless of whether you close it or not. When compiled, Screen1 should not initialise when using closeScreen from Screen2 (which should return you to Screen1 as it was), meaning the variable blocks are not necessary. (I rarely, if ever use multiple screens....)

Instead of multiple screens, you could use Virtual screens.

When we define virtual screens, we use one 'real' App Inventor Screen (most often Screen1). Screen-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual Screens. This is generally a better approach for multi-screen Apps, they share data without having to "pass" it between screens and it also reduces code duplication, making the App more efficient and the code easier to follow if you have to return to it at a later date.
So, instead of separate "houses", virtual screens are "rooms" of the same "house".