https://developer.xamarin.com/recipes/android/fundamentals/activity/pass_data_between_activity/ xamarin的官网实例 超实用
https://developer.xamarin.com/recipes/android/controls/webview/call_csharp_from_javascript/ xamarin的官网 JS调用服务 超实用
https://developer.xamarin.com/recipes/android/controls/webview/load_local_content/ xamarin的官网 手机嵌入网页开发 超实用
https://docs.microsoft.com/zh-cn/xamarin/android/app-fundamentals/broadcast-receivers 官网 广播器使用
https://developer.xamarin.com/api/type/Android.Content.BroadcastReceiver/ 官网 函数文档
https://docs.microsoft.com/zh-cn/xamarin/android/platform/android-manifest xamarin清单网址
apk打包,打包就是存档之后进行分布,存档和分布是特有名词,没有准确的文档,要参考下面两个网站,自己学习完成。
https://blog.csdn.net/xsfqh/article/details/76974580
service长存设置,这边博客写的很好。
https://blog.csdn.net/mad1989/article/details/22492519
辅助网站
http://www.android-studio.org/ 安卓官网社区 没啥用
http://www.runoob.com/android/android-tutorial.html 安卓菜鸟教程 入门实用
添加View.IOnClickListener ,btn_search.SetOnClickListener(this);开启监听
OnClick(View v)里判断控件 if (v.Id == Resource.Id.btn_search)
[Activity(Label = "Main", MainLauncher = true, Icon = "@drawable/icon")] public class MainActivity : Activity,IGongAnView,View.IOnClickListener { TextView txt_result; Button btn_search; EditText btn_sitedomain; protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); txt_result = FindViewById<TextView>(Resource.Id.txt_result); btn_search = FindViewById<Button>(Resource.Id.btn_search); btn_sitedomain = FindViewById<EditText>(Resource.Id.btn_sitedomain); btn_search.SetOnClickListener(this); } public void OnClick(View v) { if (v.Id == Resource.Id.btn_search) { string sitedomain = btn_sitedomain.Text; string pattern = @"^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$"; Regex reg = new Regex(pattern); if (string.IsNullOrEmpty(sitedomain)) { Toast.MakeText(this, "请输入域名", ToastLength.Short).Show(); } else if (reg.IsMatch(sitedomain)) { progressDialog.Show(); presenter.showResult(sitedomain); } else { Toast.MakeText(this, "域名错误,请重新输入", ToastLength.Short).Show(); } } } }