I have strange problem
I am using this code on each code module page:
the problem is when I leave the page and come back to it
all the data is still there (can be also CustomListVew with data)
When I am leaving the page I tried even :
but once I enter the page again all my vars (such as PG, scvMain, etc..) are still initialized
(also tried to init them again, did not help)
How do I completely remove the data from page once I leave it?
I am using this code on each code module page:
B4X:
Public Sub Show
If PG.IsInitialized = False Then
PG.Initialize("pg")
PG.RootPanel.LoadLayout("PageX")
PG.Title = Main.AppTitle
PG.RootPanel.Color = Colors.RGB (54,54,54)
PG.HideBackButton = True ' block button back
End If
Main.NavControl.ShowPage(PG)
the problem is when I leave the page and come back to it
all the data is still there (can be also CustomListVew with data)
When I am leaving the page I tried even :
B4X:
PG.RootPanel.RemoveAllViews
PG.RootPanel.RemoveViewFromParent
scvMain.RemoveViewFromParent
PG.RootPanel.RemoveAllViews
Main.NavControl.RemoveCurrentPage
but once I enter the page again all my vars (such as PG, scvMain, etc..) are still initialized
(also tried to init them again, did not help)
How do I completely remove the data from page once I leave it?