I have five sets of code to create 5 populated panels (listview etc.) as sort of dialogs.
They then reside in memory and I use visible to show them or hide them.
Naturally the creation code is still present also.
My thinking is that memory can be saved by destroying these panels after each use, and using the already available creation code to re-create them when needed. Speed is not an issue.
Is there a way to destroy the panels without individually removing each item; which would defeat the object.
You have asked a question I cannot answer. I have never read up on that nor given it any consideration. In my mind, creating a panel and making it visible or not was the way.
The panels are not different programs, they are similar to dialogs; either for viewing or selecting/filling in and not used often.
Perhaps you would be good enough to enlighten me on this unknown area.
Have a look at chapter 13.2 Program with 3 Activities in the Beginner's Giuide.
Activities are not different programs but different screens.
Each activity has it's own module making the code better readable.
Thank you for that suggestion which will solve everything. That was very enlightening.
Please correct me if I am wrong that any data, say from EditText etc, must be passed between activities via Process Globals, and that is simply because only the current activity exists... live.
...any data, say from EditText etc, must be passed between activities via Process Globals, and that is simply because only the current activity exists... live.