Android Question Back Arrow to Navigate to Previous Activity

DawningTruth

Active Member
Licensed User
In a lot of apps they have a back arrow which the user clicks to go to the previous activity.

Here is an example. The arrow is highlighted in yellow:

WtLRna.jpg


What command do you use on the on-click of the arrow to go to the previous activity?
 

emexes

Expert
Licensed User
https://www.b4x.com/android/forum/threads/stopping-activities.7188/#post-41201

If you are in a secondary activity and want to close it and return to the previous activity then you can just call Activity.Finish.

I think that calling Activity.Finish from the first/opening/Main Activity will exit your app, but I'll leave that for you to experiment with. It is possible that the Starter Service will still be hanging around in the background. There is some discussion about this in the thread:

https://www.b4x.com/android/forum/threads/exitapplication-vs-activity-finish.79548/#content
 
Last edited:
Upvote 0
Top