mirror of
https://github.com/PacktPublishing/Learn-WinUI-3-Second-Edition.git
synced 2026-06-20 12:23:09 +00:00
Adding code for completed chapter 13 solution
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using Com.Nostra13.Universalimageloader.Core;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UnoMediaCollection.Droid
|
||||
{
|
||||
[global::Android.App.ApplicationAttribute(
|
||||
Label = "@string/ApplicationName",
|
||||
Icon = "@mipmap/iconapp",
|
||||
LargeHeap = true,
|
||||
HardwareAccelerated = true,
|
||||
Theme = "@style/AppTheme"
|
||||
)]
|
||||
public class Application : Microsoft.UI.Xaml.NativeApplication
|
||||
{
|
||||
public Application(IntPtr javaReference, JniHandleOwnership transfer)
|
||||
: base(() => new AppHead(), javaReference, transfer)
|
||||
{
|
||||
ConfigureUniversalImageLoader();
|
||||
}
|
||||
|
||||
private static void ConfigureUniversalImageLoader()
|
||||
{
|
||||
// Create global configuration and initialize ImageLoader with this config
|
||||
ImageLoaderConfiguration config = new ImageLoaderConfiguration
|
||||
.Builder(Context)
|
||||
.Build();
|
||||
|
||||
ImageLoader.Instance.Init(config);
|
||||
|
||||
ImageSource.DefaultImageLoader = ImageLoader.Instance.LoadImageAsync;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user