private void LoadNetImage()
        {
            ImageLoaderConfiguration config = new ImageLoaderConfiguration
                                              .Builder(this)
                                              .ThreadPriority(Thread.NormPriority - 2)
                                              .DenyCacheImageMultipleSizesInMemory()
                                              .MemoryCacheSize(2 * 1024 * 1024)
                                              .DefaultDisplayImageOptions(DisplayImageOptions.CreateSimple())
                                              .ImageDownloader(new BaseImageDownloader(this, 5 * 1000, 30 * 1000)) // connectTimeout (5 s), readTimeout (30 s)超时时间
                                              .WriteDebugLogs()                                                    // Remove for release app
                                              .Build();

            ImageLoader.Instance.Init(config);

            ImageLoader.Instance.DisplayImage(
                "drawable://" + Resource.Mipmap.lotus,
                new ImageView(this),
                new ImageLoadingListener(this));
        }
        public override void OnCreate()
        {
            base.OnCreate();
            #region 极光推送相关
            //注册Jpush
            JPushInterface.SetDebugMode(true);
            JPushInterface.Init(ApplicationContext);
            //设置基本样式
            SetNotificationStyleBasic();
            //自定义推送通知栏样式 test
            SetNotificationStyleCustom();
            //设置保留最近5条通知
            JPushInterface.SetLatestNotificationNumber(ApplicationContext, 5);
            #endregion

            #region imageloader 使用二级缓存
            //var configuration = ImageLoaderConfiguration.CreateDefault(ApplicationContext);//创建默认的ImageLoader配置参数

            //自定义缓存路径
            var          cachePath = Android.OS.Environment.ExternalStorageDirectory.ToString() + "/" + "eldyoungCommCenter/Cache/HeadImage/";
            Java.IO.File file      = new Java.IO.File(cachePath);
            if (!file.Exists())
            {
                file.Mkdirs();                                                                     // 创建文件夹
            }
            File cacheDir      = StorageUtils.GetOwnCacheDirectory(ApplicationContext, cachePath); //自定义缓存路径
            var  configuration = new ImageLoaderConfiguration.Builder(ApplicationContext).MemoryCacheExtraOptions(480, 800)
                                 .ThreadPoolSize(3).ThreadPriority(Thread.NormPriority - 2).DenyCacheImageMultipleSizesInMemory()
                                 .MemoryCache(new UsingFreqLimitedMemoryCache(2 * 1024 * 1024)).MemoryCacheSize(2 * 1024 * 1024).DiskCacheSize(50 * 1024 * 1024)
                                 .DiskCacheFileNameGenerator(new Md5FileNameGenerator()).TasksProcessingOrder(QueueProcessingType.Lifo).DiskCacheFileCount(100)
                                 .DiskCache(new UnlimitedDiskCache(cacheDir)).DefaultDisplayImageOptions(DisplayImageOptions.CreateSimple()).ImageDownloader(new BaseImageDownloader(ApplicationContext, 5 * 1000, 30 * 1000))
                                 .Build();
            ImageLoader.Instance.Init(configuration);

            #endregion

            #region 百度地图使用
            SDKInitializer.Initialize(ApplicationContext);
            #endregion
        }
 static UILWidgetProvider()
 {
     displayOptions = DisplayImageOptions.CreateSimple();
 }