How to return from an activity?

ThePuiu

Active Member
Licensed User
Longtime User
I'm trying to build a custom dialog (a date-time selector). I make a new activity where I have edit controls and a button. When user press the button, i wish to go back in the main activity. I know is recomanded to use the "back" button of phone, but i want to know if it is possible what i want to do.
How can i do that?
 

ThePuiu

Active Member
Licensed User
Longtime User
it's working! but now, i need to notify the main activity that has closed a secondary activity (from Activity.Finish) because i must modify some label values... What should i do?
 
Upvote 0

JonPM

Well-Known Member
Licensed User
Longtime User
In your secondary activity, under Process_Globals, create a variable like:
Dim Started as Boolean

Right before you call Activity.Finish in your secondary activity do this:
Started = True

Then in your main activity, under Activity_Resume do this:
If secondactivity.Started = True Then
do whatever you want here
secondactivity.Started = False
End If
 
Upvote 0
Top