前言 我们学习任何一个新框架时,肯定都需要学习它的子页面用法,因为子页面是封装公共内容最好的容器. 在Xamarin里子页面为Fragment,翻译过来是片段的意思. Fragment 下面我们来学习Fragment的用法. 首先创建一个类MenuFragment继承Fragment:然后重写他的OnCreateView方法,代码如下: [Activity(Label = "KibaApp")] public class MenuFragment : Fragment { public
App开发经常要判断网络连通情况,并判断网络类型,获取网络IP.xamarin中可以使用Dependencies提供各平台下的方法,现把各平台代码记录如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Android.App; using Android.Content; using Android.OS; using Android.Runtime; us