Android Question Restarting an Activity

Discussion in 'Android Questions' started by DawningTruth, Jun 9, 2019.

  1. DawningTruth

    DawningTruth Active Member Licensed User

    My app requires me to restart an activity after a user generated parameter change.
    I have tried:

    Code:
    StartActivity(MyActivity)
    But it gives me an error as it cannot find: MyActivity

    Any suggestions on how I can get the App to restart the activity?
     
  2. MarkusR

    MarkusR Well-Known Member Licensed User

    u need Activity.Finish and open it from other place (Starter Service or other Activity) with StartActivity(MyActivity)
     
    DawningTruth likes this.
  3. DawningTruth

    DawningTruth Active Member Licensed User

    Thx Markus
     
  4. DawningTruth

    DawningTruth Active Member Licensed User

  5. MarkusR

    MarkusR Well-Known Member Licensed User

    Erels Hint there should also work

    Code:
    Sub Button1_Click
            
        
    Activity.Finish
        
    StartActivity(Me)
        
    End Sub
     
    DawningTruth likes this.
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