Android Question Another process/activity question

FFMan

Member
Licensed User
Longtime User
I've read the helpful article on process and activities, so I think I understand at a code/variable level what is going on.

what I'm not sure about is, when the process is resumed (lets assume Android has not killed it completely) and the activity recreated, do I need to repopulate all the contents of the labels etc ?

do the dim statements for the labels and buttons etc want to go in process level to preserve them, or is this pointless as the activity is destroyed when the process loses the focus ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
what I'm not sure about is, when the process is resumed (lets assume Android has not killed it completely) and the activity recreated, do I need to repopulate all the contents of the labels etc ?
If the activity was destroyed then Activity_Create will be called when the app resumes. You should then recreate the layout.

do the dim statements for the labels and buttons etc want to go in process level to preserve them, or is this pointless as the activity is destroyed when the process loses the focus ?
The compiler will not allow you to declare any "ui related" variable in process_globals as it will cause a memory leak (it will prevent the activity from being destroyed).
 
Upvote 0
Top