diff --git a/Pixiview.iOS/Resources/fa-light-300.ttf b/Pixiview.iOS/Resources/fa-light-300.ttf new file mode 100644 index 0000000..174b27b Binary files /dev/null and b/Pixiview.iOS/Resources/fa-light-300.ttf differ diff --git a/Pixiview.iOS/Resources/fa-regular-400.ttf b/Pixiview.iOS/Resources/fa-regular-400.ttf new file mode 100644 index 0000000..79519b4 Binary files /dev/null and b/Pixiview.iOS/Resources/fa-regular-400.ttf differ diff --git a/Pixiview.iOS/Resources/fa-solid-900.ttf b/Pixiview.iOS/Resources/fa-solid-900.ttf new file mode 100644 index 0000000..0c9503f Binary files /dev/null and b/Pixiview.iOS/Resources/fa-solid-900.ttf differ diff --git a/Pixiview.iOS/Services/EnvironmentService.cs b/Pixiview.iOS/Services/EnvironmentService.cs new file mode 100644 index 0000000..6f70d75 --- /dev/null +++ b/Pixiview.iOS/Services/EnvironmentService.cs @@ -0,0 +1,22 @@ +using Pixiview.iOS.Services; +using Pixiview.Utils; +using Xamarin.Forms; + +[assembly: Dependency(typeof(EnvironmentService))] +namespace Pixiview.iOS.Services +{ + public class EnvironmentService : IEnvironmentService + { + public EnvironmentParameter GetEnvironment() + { + return new EnvironmentParameter + { + IconLightFontFamily = "FontAwesome5Pro-Light", + IconRegularFontFamily = "FontAwesome5Pro-Regular", + IconSolidFontFamily = "FontAwesome5Pro-Solid", + + IconLeft = "\uf104" // for android, it's "\uf060" + }; + } + } +} diff --git a/Pixiview/Utils/Extensions.cs b/Pixiview/Utils/Extensions.cs new file mode 100644 index 0000000..7e4a3ec --- /dev/null +++ b/Pixiview/Utils/Extensions.cs @@ -0,0 +1,32 @@ +using Xamarin.Forms; + +namespace Pixiview.Utils +{ + public static class StatusBar + { + private const string StatusBarStyle = nameof(StatusBarStyle); + + public static readonly BindableProperty StatusBarStyleProperty = BindableProperty.CreateAttached( + StatusBarStyle, + typeof(StatusBarStyles), + typeof(Page), + StatusBarStyles.WhiteText); + + public static StatusBarStyles GetStatusBarStyle(VisualElement page) => (StatusBarStyles)page.GetValue(StatusBarStyleProperty); + public static void SetStatusBarStyle(VisualElement page, StatusBarStyles value) => page.SetValue(StatusBarStyleProperty, value); + } + + public enum StatusBarStyles + { + Default, + // Will behave as normal. + // White text on black NavigationBar/in iOS Dark mode and + // Black text on white NavigationBar/in iOS Light mode + DarkText, + // Will switch the color of content of StatusBar to black. + WhiteText, + // Will switch the color of content of StatusBar to white. + Hidden + // Will hide the StatusBar + } +} diff --git a/Pixiview/Utils/IEnvironmentService.cs b/Pixiview/Utils/IEnvironmentService.cs new file mode 100644 index 0000000..0103cb9 --- /dev/null +++ b/Pixiview/Utils/IEnvironmentService.cs @@ -0,0 +1,16 @@ + +namespace Pixiview.Utils +{ + public interface IEnvironmentService + { + EnvironmentParameter GetEnvironment(); + } + + public class EnvironmentParameter + { + public string IconLightFontFamily { get; set; } + public string IconRegularFontFamily { get; set; } + public string IconSolidFontFamily { get; set; } + public string IconLeft { get; set; } + } +} diff --git a/Pixiview/Utils/UIFactory.cs b/Pixiview/Utils/UIFactory.cs new file mode 100644 index 0000000..b84882b --- /dev/null +++ b/Pixiview/Utils/UIFactory.cs @@ -0,0 +1,16 @@ +using Xamarin.Forms; + +namespace Pixiview.Utils +{ + public static class UIFactory + { + public static NavigationPage CreateNavigationPage(Page root) + { + var navigation = new NavigationPage(root); + navigation.SetDynamicResource(NavigationPage.BarBackgroundColorProperty, App.MainColor); + navigation.SetDynamicResource(NavigationPage.BarTextColorProperty, App.MainTextColor); + navigation.SetDynamicResource(VisualElement.BackgroundColorProperty, App.WindowColor); + return navigation; + } + } +} diff --git a/Res/Icon-512x512.png b/Res/Icon-512x512.png new file mode 100644 index 0000000..0e7fdc7 Binary files /dev/null and b/Res/Icon-512x512.png differ