Reputation: 135
I was wondering whats the best way to switch to another page while programming with c# with mono for android programming? (eg. " having a menu lead to the actual activity when u press a button")... The code and some examples would be very helpful, thanks you. (im using linear layout by the way)
Upvotes: 1
Views: 5546
Reputation: 16222
From xamarin doc:
var showSecond = FindViewById<Button> (Resource.Id.showSecond);
showSecond.Click += (sender, e) => {
StartActivity (typeof(SecondActivity));
};
StartActivity(Type activityType)
is what you're looking for.
Upvotes: 5