I found this java code to create a generic method to start any activity from other activity.
public void gotoActivity(Class activityClassReference)
{
Intent i = new Intent(this,activityClassReference);
startActivity(i);
}
How can I convert that code to c# for xamarin-Android?
Thanks in advance.
You can write:
public void GoToActivity(Type myActivity)
{
StartActivity(myActivity);
}
and call it like:
GoToActivity(typeof(ActivityType));
or just write:
StartActivity(typeof(ActivityType));