Nicholas
Nicholas

Reputation: 1

In a Xamarin App, how do write a method that starts a new activity?

I want to be able to switch pages within my Xamarin App easily.

I've looked at clear examples on how to do this in java for Android Studios and I know Xamarin should be extremely similar, but I'd like to know the exact syntax in C# and an easy way do it in Xamarin.

Upvotes: 0

Views: 38

Answers (1)

SushiHangover
SushiHangover

Reputation: 74209

You use StartActivity:

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

Xamarin has a quick start that covers this:

re: Hello, Android Multiscreen: Quickstart

Upvotes: 1

Related Questions