Unload layout

bgsoft

Well-Known Member
Licensed User
Longtime User
Hello

I have a program with two layout, from the main call to another (startActivity (NameLayout2)) and load an image, and leave to the phone button to go back.
But I saw that in the log, when I enter the second layout again in the Activity_Create, the FirstTime this to False. I think this means that is unloaded.

In Activity_Pause when UserClosed = True, I put all this, to see if unloaded:

B4X:
TouchImageView1.RemoveView

Activity.RemoveAllViews
Activity.RemoveView
Activity.Finish

Any way to make it unload "real"?
The image that I use is a TouchImageView. The discharge with TouchImageView1.RemoveView, but I think that does not work, if go in and out, several times seeing several large photos, gives a memory error.

thanks


Jesús
 

bgsoft

Well-Known Member
Licensed User
Longtime User
Thanks for your answer Erel

I have a question: If FirsTime is related to the process, because to not destroy the activity goes to FirsTime to False?.
I understand that FirsTime is a variable that activity level (of this layout).
Because when I go into main, at the end of the Activity_Create, FirsTime goes to False , but when entering the second layout is True


thanks

Jesus

Sorry if I did not express well in English
 
Upvote 0
Top