您现在的位置是:首页 > 文章详情

xamarin开始手机软件实用网站

日期:2018-04-10点击:341

 

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

http://blog.yn137.com/yi-dong-app-kai-fa/xamarin-for-android-%E6%89%93%E5%8C%85%E7%BC%96%E8%AF%91apk%E6%96%87%E4%BB%B6%E8%AF%A6%E7%BB%86%E5%9B%BE%E6%96%87%E6%95%99%E7%A8%8B.html

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(); } } }  } 

 

原文链接:https://yq.aliyun.com/articles/611965
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章