using System; using System.Collections.Generic; using UnityEngine.Localization.Metadata; namespace UnityEngine.Localization.Platform.Android { /// /// Provides Android Adaptive icon configuration /// Please see [Android Documentation](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) for more details on Adaptive Icon. /// [Serializable] public class AdaptiveIcon { [SerializeField] LocalizedTexture m_Background; [SerializeField] LocalizedTexture m_Foreground; /// /// Updates the background inner element of the Adaptive Icon for respective density qualifiers that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) for more details on Adaptive Icon. /// public LocalizedTexture Background { get => m_Background; set => m_Background = value; } /// /// Updates the foreground inner element of the Adaptive Icon for respective density qualifiers that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) for more details on Adaptive Icon. /// public LocalizedTexture Foreground { get => m_Foreground; set => m_Foreground = value; } } /// /// Contains values for configuring the Android Adaptive Icon. /// An Adaptive Launcher Icon represents the application icon on the device's Home Screen and in the launcher window on devices running Android 8 and above. /// Please see [Android Documentation](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) for more details on Adaptive Icon. /// /// /// This example shows how to configure the Android App Info. /// __Note__: You must complete this configuration before the application is built, otherwise, the changes will not be applied. /// /// [DisplayName("Android Adaptive Icon Info")] [Metadata(AllowedTypes = MetadataType.LocalizationSettings, AllowMultiple = false, MenuItem = "Android/Adaptive Icon")] [Serializable] public class AdaptiveIconsInfo : IMetadata { [SerializeField] AdaptiveIcon m_Adaptive_idpi; [SerializeField] AdaptiveIcon m_Adaptive_mdpi; [SerializeField] AdaptiveIcon m_Adaptive_hdpi; [SerializeField] AdaptiveIcon m_Adaptive_xhdpi; [SerializeField] AdaptiveIcon m_Adaptive_xxhdpi; [SerializeField] AdaptiveIcon m_Adaptive_xxxhdpi; internal List AdaptiveIcons = new List(); internal void RefreshAdaptiveIcons() { AdaptiveIcons.Clear(); AdaptiveIcons.Add(m_Adaptive_idpi); AdaptiveIcons.Add(m_Adaptive_mdpi); AdaptiveIcons.Add(m_Adaptive_hdpi); AdaptiveIcons.Add(m_Adaptive_xhdpi); AdaptiveIcons.Add(m_Adaptive_xxhdpi); AdaptiveIcons.Add(m_Adaptive_xxxhdpi); } /// /// Contains resources for high-density (hdpi) screens (~240dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public AdaptiveIcon AdaptiveHdpi { get => m_Adaptive_hdpi; set => m_Adaptive_hdpi = value; } /// /// Contains resources for low-density (ldpi) screens (~120dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public AdaptiveIcon AdaptiveIdpi { get => m_Adaptive_idpi; set => m_Adaptive_idpi = value; } /// /// Contains resources for medium-density (mdpi) screens (~160dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public AdaptiveIcon AdaptiveMdpi { get => m_Adaptive_mdpi; set => m_Adaptive_mdpi = value; } /// /// Contains resources for extra-high-density (xhdpi) screens (~320dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public AdaptiveIcon AdaptiveXhdpi { get => m_Adaptive_xhdpi; set => m_Adaptive_xhdpi = value; } /// /// Contains resources for extra-extra-high-density (xxhdpi) screens (~480dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public AdaptiveIcon AdaptiveXXHdpi { get => m_Adaptive_xxhdpi; set => m_Adaptive_xxhdpi = value; } /// /// Contains resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public AdaptiveIcon AdaptiveXXXHdpi { get => m_Adaptive_xxxhdpi; set => m_Adaptive_xxxhdpi = value; } } /// /// Contains values for configuring the Android Round Icon. /// An Round Launcher Icon represents the application icon on the device's Home Screen and in the launcher window (if launcher supports round icons) on devices running Android 7.1 and above. /// Please see [Android Documentation](https://developer.android.com/about/versions/nougat/android-7.1.html#circular-icons) for more details on Round Icon. /// [DisplayName("Android Round Icon Info")] [Metadata(AllowedTypes = MetadataType.LocalizationSettings, AllowMultiple = false, MenuItem = "Android/Round Icon")] [Serializable] public class RoundIconsInfo : IMetadata { [SerializeField] LocalizedTexture m_Round_idpi; [SerializeField] LocalizedTexture m_Round_mdpi; [SerializeField] LocalizedTexture m_Round_hdpi; [SerializeField] LocalizedTexture m_Round_xhdpi; [SerializeField] LocalizedTexture m_Round_xxhdpi; [SerializeField] LocalizedTexture m_Round_xxxhdpi; internal List RoundIcons = new List(); internal void RefreshRoundIcons() { RoundIcons.Clear(); RoundIcons.Add(m_Round_idpi); RoundIcons.Add(m_Round_mdpi); RoundIcons.Add(m_Round_hdpi); RoundIcons.Add(m_Round_xhdpi); RoundIcons.Add(m_Round_xxhdpi); RoundIcons.Add(m_Round_xxxhdpi); } /// /// Contains resources for high-density (hdpi) screens (~240dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture RoundHdpi { get => m_Round_hdpi; set => m_Round_hdpi = value; } /// /// Contains resources for low-density (ldpi) screens (~120dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture RoundIdpi { get => m_Round_idpi; set => m_Round_idpi = value; } /// /// Contains resources for medium-density (mdpi) screens (~160dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture RoundMdpi { get => m_Round_mdpi; set => m_Round_mdpi = value; } /// /// Contains resources for extra-high-density (xhdpi) screens (~320dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture RoundXhdpi { get => m_Round_xhdpi; set => m_Round_xhdpi = value; } /// /// Contains resources for extra-extra-high-density (xxhdpi) screens (~480dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture RoundXXHdpi { get => m_Round_xxhdpi; set => m_Round_xxhdpi = value; } /// /// Contains resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture RoundXXXHdpi { get => m_Round_xxxhdpi; set => m_Round_xxxhdpi = value; } } /// /// Contains values for configuring the Android Legacy Icon. /// An Legacy Launcher Icon represents the application icon on the device's Home Screen and in the launcher window on devices running Android 7.1 and earlier. /// Please see [Android Documentation](https://developer.android.com/about/versions/nougat/android-7.1.html) for more details. /// [DisplayName("Android Legacy Icon Info")] [Metadata(AllowedTypes = MetadataType.LocalizationSettings, AllowMultiple = false, MenuItem = "Android/Legacy Icon")] [Serializable] public class LegacyIconsInfo : IMetadata { [SerializeField] LocalizedTexture m_Legacy_idpi; [SerializeField] LocalizedTexture m_Legacy_mdpi; [SerializeField] LocalizedTexture m_Legacy_hdpi; [SerializeField] LocalizedTexture m_Legacy_xhdpi; [SerializeField] LocalizedTexture m_Legacy_xxhdpi; [SerializeField] LocalizedTexture m_Legacy_xxxhdpi; internal List LegacyIcons = new List(); internal void RefreshLegacyIcons() { LegacyIcons.Clear(); LegacyIcons.Add(m_Legacy_idpi); LegacyIcons.Add(m_Legacy_mdpi); LegacyIcons.Add(m_Legacy_hdpi); LegacyIcons.Add(m_Legacy_xhdpi); LegacyIcons.Add(m_Legacy_xxhdpi); LegacyIcons.Add(m_Legacy_xxxhdpi); } /// /// Contains resources for high-density (hdpi) screens (~240dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture LegacyHdpi { get => m_Legacy_hdpi; set => m_Legacy_hdpi = value; } /// /// Contains resources for low-density (ldpi) screens (~120dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture LegacyIdpi { get => m_Legacy_idpi; set => m_Legacy_idpi = value; } /// /// Contains resources for medium-density (mdpi) screens (~160dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture LegacyMdpi { get => m_Legacy_mdpi; set => m_Legacy_mdpi = value; } /// /// Contains resources for extra-high-density (xhdpi) screens (~320dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture LegacyXhdpi { get => m_Legacy_xhdpi; set => m_Legacy_xhdpi = value; } /// /// Contains resources for extra-extra-high-density (xxhdpi) screens (~480dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture LegacyXXHdpi { get => m_Legacy_xxhdpi; set => m_Legacy_xxhdpi = value; } /// /// Contains resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi) that can be localized in the Android Application /// Please see [Android Documentation](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp) for more details on density qualifiers. /// public LocalizedTexture LegacyXXXHdpi { get => m_Legacy_xxxhdpi; set => m_Legacy_xxxhdpi = value; } } }