Issue
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.
Solution
You can write:
public void GoToActivity(Type myActivity)
{
StartActivity(myActivity);
}
and call it like:
GoToActivity(typeof(ActivityType));
or just write:
StartActivity(typeof(ActivityType));
Answered By - Stam
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.