标签:
通常每个Activity对应1个Layout,在onCreate时指定layout(否则引用的还是main的layout),然后调用startActivity:protected override void OnCreate (Bundle bundle) { SetContentView (Resource.Layout.UserRegister); base.OnCreate (bundle); // Create your application here var btnBack = FindViewById<Button> (Resource.Id.btnUserRgst_Back); btnBack.Click += (object sender, EventArgs e) => { StartActivity(typeof(MainActivity)); }; }
var intent = new Intent(this, typeof(UserRegister)); StartActivity(intent);
C# 使用Xamarin 开发应用 -- 切换Activity
标签:
原文地址:http://blog.csdn.net/lan_liang/article/details/45114431