Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
46
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

Chapter 5 User Interface Essentials

Android

App icons on Android can take many different shapes due to the different device manufacturers and their own flavor of the Android operating system. To cater for this, Google introduced the adaptive icon. This allows a developer to define two layers in their icon:

•\

The background: This is typically a single color or

 

consistent pattern.

•\

The foreground: This includes the main detail.

.NET MAUI allows you to support the adaptive icon using the

IncludeFile and the ForegroundFile properties on the MauiIcon element. You can see the IncludeFile is already defined in your project. This represents the background. You can split your application icon into two parts and then provide the detail to the ForegroundFile. Note that this can be applied to all platforms and is my recommended way to ship an application icon.

iOS andmacOS

Apple does not allow for any transparency in an app icon. You can either make sure that you supply an image with no transparent pixels or you can use the Color property on the MauiIcon element, which will fill in any transparent pixels with that defined color.

Splash Screen

A splash screen is the first thing a user sees when they start your application. It gives you as a developer a way of showing the user something while the application is launching. Once everything has finished loading, the splash screen will be hidden and your main page will be shown.

118