How do I move to another layout/activity from the second layout/activity?

ChristianEmmanuelChristianEmmanuel USMember ✭✭
edited October 24 in Xamarin.Android

I'm developing an Android app with Xamarin and I was able to understand how to create a button and go from the main layout1 to layout2 but when I try to go from layout2 to layout3 the button doesn't work and I've been trying to research and get nothing.

I tried putting this code in the MainActivity.cs and in the second Activity so it can go to layout3 but I noticed my code works from MainActivity.cs to go to layout3 but the code doesn't work from layout2 to go to layout3 - help please?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace MichaelsRestaurant
{
[Activity(Label = "Menu Selection")]
public class Menu : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.MenuMain);

        Button BreakFast = FindViewById<Button>(Resource.Id.BTN_MAINMENU_BREAKFAST);
        BreakFast.Click += delegate {
            SetContentView(Resource.Layout.BreakfastMenu);

        };



    }
}

}

Best Answer

Answers

Sign In or Register to comment.