Android Question Activity.Finish problem

cenyu

Active Member
Licensed User
Longtime User
Hi i have some strange problem...I have two activities - one MainActivity and Activity#1. When from MainActivity i call StartActivity("Activity#1") Activity#1 is loaded BUT when i go back with Activity.Finish Activity#1 stay loaded and new StartActivity("Activity#1") only call Activity.Resume not Create...WHY? AND HOW DESTROY ACTIVITY#1?

Or this is something i don't understand :-(
 

DonManfred

Expert
Licensed User
Longtime User
when i go back with Activity.Finish Activity#1 stay loaded and new StartActivity("Activity#1") only call Activity.Resume not Create...WHY?
act1 is your main. You start act2 and then use act.finish in act2. So android will point you back to act1 which is the default behaviour. And the EXPECTED.
activity_create is only called if your activity is CREATED.

AND HOW DESTROY ACTIVITY#1?
DONT SCREAM!!!

B4X:
'in act1
startactivity(act2)
activity.finish
 
Upvote 0

cenyu

Active Member
Licensed User
Longtime User
I agree. You are right! Can i destroy act2? How to call Activity CREATE again?
Thanks!
 
Upvote 0
Top