Android Question Back Arrow to Navigate to Previous Activity

Discussion in 'Android Questions' started by DawningTruth, Jul 6, 2019.

Tags:
  1. DawningTruth

    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:

    [​IMG]

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

    emexes Well-Known Member 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: Jul 6, 2019
    DawningTruth likes this.
  3. DawningTruth

    DawningTruth Active Member Licensed User

    Thx Emexes my bud :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice