Here is the problem..
I have a Main and a Service module + other class module in the same code block
Let say i have a panel containing a Customlistview object Called TOC that i populate with items. But the same customlistview is use for other layout such as a menu list, and a search result list. The problem is when i minimize the app, i loose this customListview and have to rebuild it from the ground up. The same is also true if i load a layout for the search result that appear in the same panel as the TOC Panel.
I also have defined Global Vars in the service that hold my TOC content and Menu content and the Search result content as objects, wich is keept when the app is minimized and i do not need to load these values again in a list using Custom Type structure.
So what i want to be accomplish is to Build the TOC content from the Main at startup, also the menu content at startup, wich can take some time to load into the customlistview item by item and save it to the service module so that it could be reused when needed.
So i'm wondering if it is possible to make a copy of this TOC customlistview or the MENU listview and saved it to a variable in the service module to be keept in memory so that i don't have to load it item by item again, but just swap the object from the service module to the main Customlistview object wich is store in a panel on the main display area.
I've been told that you can't store view object in global vars, but can we save the CustomlistviewObject as global object to the service module and been able to reload that object in the main module when we want to display the TOC object, without reloading item by item, but just as a global object that we can swap. The TOC must be loaded once and the same as the menu, the search result object is build when we make a search, but that panel can be sidebar using the B4XDrawer that we swap into view with a right to left or left to right gesture.
Anybody have any idea on how to do this, that will save me a lot of time rebuilding each Listview when the application resume. ???
I have a Main and a Service module + other class module in the same code block
Let say i have a panel containing a Customlistview object Called TOC that i populate with items. But the same customlistview is use for other layout such as a menu list, and a search result list. The problem is when i minimize the app, i loose this customListview and have to rebuild it from the ground up. The same is also true if i load a layout for the search result that appear in the same panel as the TOC Panel.
I also have defined Global Vars in the service that hold my TOC content and Menu content and the Search result content as objects, wich is keept when the app is minimized and i do not need to load these values again in a list using Custom Type structure.
So what i want to be accomplish is to Build the TOC content from the Main at startup, also the menu content at startup, wich can take some time to load into the customlistview item by item and save it to the service module so that it could be reused when needed.
So i'm wondering if it is possible to make a copy of this TOC customlistview or the MENU listview and saved it to a variable in the service module to be keept in memory so that i don't have to load it item by item again, but just swap the object from the service module to the main Customlistview object wich is store in a panel on the main display area.
I've been told that you can't store view object in global vars, but can we save the CustomlistviewObject as global object to the service module and been able to reload that object in the main module when we want to display the TOC object, without reloading item by item, but just as a global object that we can swap. The TOC must be loaded once and the same as the menu, the search result object is build when we make a search, but that panel can be sidebar using the B4XDrawer that we swap into view with a right to left or left to right gesture.
Anybody have any idea on how to do this, that will save me a lot of time rebuilding each Listview when the application resume. ???