Android Question What is the correct way?

vecino

Well-Known Member
Licensed User
Longtime User
Hi, the correct mode is 1, 2, 3 or none?

1.
B4X:
Sub btExit_Click
  Activity.Finish
  CallSubDelayed2 ("another activity", "some sub", "some value")
End If
2.
B4X:
Sub btExit_Click
  CallSubDelayed2 ("another activity", "some sub", "some value")
  Activity.Finish
End If
3.
B4X:
Sub btExit_Click
  CallSubDelayed2 ("another activity", "some sub", "some value")
End If
 

DonManfred

Expert
Licensed User
Longtime User
1 and 2 are both good. 3 too if you do not need a Activity.finish (or let android decide when to kill the activity).
Both commands are send to the commandqueue. The queue runs when the sub finishes.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i hade some trouble with just the sub name as string and used also SubExists
 
Upvote 0
Top