You could so something like:
In the
Globals sub add:
Dim set_textbox As String
Then use the following code in the
Activity_Resume sub (replace your current code in this sub with the code below):
If set_textbox = "txtbox1" Then
txtbox1.Text = Activity2.tmpresult
End If
If set_textbox = "txtbox2" Then
txtbox2.Text = Activity2.tmpresult
End If
Then in your
Designer you will need to change the
Event Name for ImgView1 & ImgView2.
So they will become:
ImgView1 Event Name = ImgView1
ImgView2 Event Name = ImgView2
(Rather than ImgView for both.)
Then use the following code in your
Main Activity:
Sub ImgView1_Click
set_textbox = "txtbox1"
StartActivity(Activity2)
End Sub
Sub ImgView2_Click
set_textbox = "txtbox2"
StartActivity(Activity2)
End Sub
Now when you press the image it will load your calendar activity and will load the date into the correct textbox when your calendar activity is closed.
There maybe other ways in doing this but it worked for me
