ciginfo Well-Known Member Licensed User Longtime User Jan 23, 2021 #1 Hello Is it possible to apply a condition if an activity is loaded? I have a button which must have a different action depending on whether this or that activity is loaded. Example, like: Sub Button1_Click If activity(activity name) is loaded Then Mylabel.text = "Hello" end if End Sub What can be the syntax if it is possible? Thank you
Hello Is it possible to apply a condition if an activity is loaded? I have a button which must have a different action depending on whether this or that activity is loaded. Example, like: Sub Button1_Click If activity(activity name) is loaded Then Mylabel.text = "Hello" end if End Sub What can be the syntax if it is possible? Thank you
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2021 #2 Please use [code]code here...[/code] tags when posting code. The sooner you switch to B4XPages, the sooner things will become simpler. You can check if an activity is in the foreground with IsPaused(Activity). If you want to know whether the activity was created at least once then use a process global variable as answered above. Upvote 0
Please use [code]code here...[/code] tags when posting code. The sooner you switch to B4XPages, the sooner things will become simpler. You can check if an activity is in the foreground with IsPaused(Activity). If you want to know whether the activity was created at least once then use a process global variable as answered above.