add files
This commit is contained in:
parent
795aa09152
commit
98e118a481
BIN
Pixiview.iOS/Resources/fa-light-300.ttf
Normal file
BIN
Pixiview.iOS/Resources/fa-light-300.ttf
Normal file
Binary file not shown.
BIN
Pixiview.iOS/Resources/fa-regular-400.ttf
Normal file
BIN
Pixiview.iOS/Resources/fa-regular-400.ttf
Normal file
Binary file not shown.
BIN
Pixiview.iOS/Resources/fa-solid-900.ttf
Normal file
BIN
Pixiview.iOS/Resources/fa-solid-900.ttf
Normal file
Binary file not shown.
22
Pixiview.iOS/Services/EnvironmentService.cs
Normal file
22
Pixiview.iOS/Services/EnvironmentService.cs
Normal file
@ -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"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
32
Pixiview/Utils/Extensions.cs
Normal file
32
Pixiview/Utils/Extensions.cs
Normal file
@ -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
|
||||
}
|
||||
}
|
16
Pixiview/Utils/IEnvironmentService.cs
Normal file
16
Pixiview/Utils/IEnvironmentService.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
16
Pixiview/Utils/UIFactory.cs
Normal file
16
Pixiview/Utils/UIFactory.cs
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
BIN
Res/Icon-512x512.png
Normal file
BIN
Res/Icon-512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
Loading…
x
Reference in New Issue
Block a user