I have 3 LAYOUT1, LAYOUT2, AND LAYOUT3 - meaning I have 3 Activities

I am able to press the back button to from LAYOUT2 back to LAYOUT1 but how would I go from LAYOUT3 TO LAYOUT2 TO LAYOUT1.

I have tried doing different things such as this

In the MainActivity I have this

    public override void OnBackPressed()
    {
        var intent = new Intent(this, typeof(MainActivity));
        StartActivity(intent);

    }

In the SecondActivity I have this

    public override void OnBackPressed()
    {

            var intent = new Intent(this, typeof(Menu));
            StartActivity(intent);

    }

With that code above it just stays on the SecondActivity and doesn't go back to the MainActivity - why?

Best Answers

Answers

Sign In or Register to comment.