public static Shadow itemLightBoxShadow = new Shadow(4.0f, new Color(0, 0, 0, 0.10f), new Vector2(2, 2));
public static Shadow itemDarkBoxShadow = new Shadow(4.0f, new Color(1.0f, 1.0f, 1.0f, 0.20f), new Vector2(2, 2));
+ public static Size2D buttonSize = new Size2D(48, 48).SpToPx();
+ public static Size2D saveButtonSize = new Size2D(234, 48).SpToPx();
public static int albumIconTextHeight = 24.SpToPx();
public static int imageItemWidth = 130.SpToPx();
public static int albumTitleHeight = 32.SpToPx();
public static Extents backButtonMargin = new Extents(16, 8, 8, 8).SpToPx();
public static Extents albumTitleMargin = new Extents(0, 16, 16, 16).SpToPx();
+ public static Extents saveButtonMargin = new Extents(0, 64, 8, 0).SpToPx();
public static int centerTextHeight = 32.SpToPx();
public static int centerTextPixelSize = 24.SpToPx();
<Project Sdk="Tizen.NET.Sdk/1.1.9">
- <PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
- <TizenCreateTpkOnBuild>false</TizenCreateTpkOnBuild>
- </PropertyGroup>
+ <PropertyGroup>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <TizenCreateTpkOnBuild>false</TizenCreateTpkOnBuild>
+ </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugType>portable</DebugType>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>None</DebugType>
- </PropertyGroup>
- <ItemGroup>
- <PackageReference Include="Tizen.NET" Version="11.0.0.17848" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="SettingCore">
- <HintPath>..\..\..\settings\SettingCore\bin\Debug\netcoreapp3.1\SettingCore.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Core\" />
- <Folder Include="Models\" />
- <Folder Include="MediaContent\" />
- <Folder Include="ViewModels\" />
- </ItemGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="Tizen.NET" Version="11.0.0.17848" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="SettingCore">
+ <HintPath>..\..\..\settings\SettingCore\bin\Debug\netcoreapp3.1\SettingCore.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Core\" />
+ <Folder Include="Models\" />
+ <Folder Include="MediaContent\" />
+ <Folder Include="ViewModels\" />
+ </ItemGroup>
</Project>
BackgroundColor = Color.Transparent;
ThemeChangeSensitive = true;
Layout = new RelativeLayout();
+
+ ImageView icon = new ImageView
+ {
+ StyleName = "BackIcon",
+ };
backButton = new Button()
{
- StyleName = "BackButton",
+ Size2D = AppCommon.buttonSize,
CornerRadius = AppCommon.itemCornerRadius,
Margin = AppCommon.backButtonMargin,
+ IsSelectable = false,
+ IsEnabled = true,
+ BackgroundColor = Color.Transparent,
};
+ backButton.Add(icon);
backButton.SetBinding(Control.CommandProperty, "BackButtonCommand");
albumTitle = new TextLabel()
private void AddPreviousButton()
{
+ ImageView icon = new ImageView
+ {
+ StyleName = "PreviousIcon",
+ };
previousButton = new Button()
{
- StyleName = "PreviousButton",
+ Size2D = AppCommon.buttonSize,
+ BackgroundColor = Color.Transparent,
};
+ previousButton.Add(icon);
previousButton.SetBinding(IsEnabledProperty, "IsPreviousImageAvailable");
previousButton.SetBinding(Control.CommandProperty, "PreviousButtonCommand");
bottomView.Add(previousButton);
private void AddAlbumsFolder()
{
+ ImageView icon = new ImageView
+ {
+ StyleName = "AlbumIcon",
+ };
albumFolder = new Button()
{
StyleName = "AlbumFolder",
};
+ albumFolder.Add(icon);
albumFolder.SetBinding(Control.CommandProperty, "AlbumFolderCommand");
bottomView.Add(albumFolder);
}
private void AddNextButton()
{
+ ImageView icon = new ImageView
+ {
+ StyleName = "NextIcon",
+ };
nextButton = new Button()
{
- StyleName = "NextButton",
+ Size2D = AppCommon.buttonSize,
+ BackgroundColor = Color.Transparent,
};
+ nextButton.Add(icon);
nextButton.SetBinding(IsEnabledProperty, "IsNextImageAvailable");
nextButton.SetBinding(Control.CommandProperty, "NextButtonCommand");
bottomView.Add(nextButton);
private void AddAppBar()
{
- var appBarStyle = ThemeManager.GetStyle("Tizen.NUI.Components.AppBar") as AppBarStyle;
- appBarStyle.ActionButton.BackgroundColor = ThemeManager.PlatformThemeId == Resources.LightPlatformThemeId ? new Color("#FF6200") : new Color("#FF8A00");
- appBarStyle.ActionButton.Text.TextColor = ThemeManager.PlatformThemeId == Resources.LightPlatformThemeId ? new Color("#FDFDFD") : new Color("#16131A");
- appBarStyle.ActionButton.CornerRadius = 12f.SpToPx();
- appBarStyle.ActionButton.SizeHeight = 48f.SpToPx();
- appBarStyle.ActionButton.Margin = new Extents(0, 64, 16, 0).SpToPx();
- appBarStyle.ActionButton.Icon = null;
- appBarStyle.TitleTextLabel.PixelSize = 24f.SpToPx();
-
var backButton = new SettingCore.Views.BackButton();
- backButton.Margin = new Extents(16, 0, 0, 0).SpToPx();
+ backButton.Margin = AppCommon.backButtonMargin;
backButton.Clicked += (s, e) => GadgetNavigation.NavigateBack();
+ ImageView icon = new ImageView
+ {
+ StyleName = "SaveIcon",
+ };
SaveButton = new Button()
{
- Text = "Save",
+ Size2D = AppCommon.saveButtonSize,
+ BackgroundColor = Color.Transparent,
IsEnabled = true,
+ Margin = AppCommon.saveButtonMargin,
};
+ SaveButton.Add(icon);
SaveButton.SetBinding(Control.CommandProperty, "SetWallpaperCommand");
SaveButton.Hide();
- appBar = new AppBar(appBarStyle)
+ appBar = new AppBar()
{
- Size = new Size(-1, 64).SpToPx(),
- Padding = new Extents(0, 0, 0, 0).SpToPx(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = AppCommon.customItemHeight,
NavigationContent = backButton,
BackgroundColor = Color.Transparent,
ThemeChangeSensitive = true,
- Actions = new List<View> { SaveButton },
};
-
+ appBar.ActionContent.Add(SaveButton);
Add(appBar);
}
</c:DefaultTitleItemStyle>
<TextLabelStyle x:Key="ItemText" TextColor="#FDFDFD" FontFamily="BreezeSans" VerticalAlignment="Center" ThemeChangeSensitive="True"/>
- <c:ButtonStyle x:Key="BackButton" Size="48sp, 48sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" ThemeChangeSensitive="True">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="48sp, 48sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/back.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/dark/back_pressed.png" />
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
-
- <c:ButtonStyle x:Key="PreviousButton" Size="48sp, 48sp" BackgroundColor="Transparent" ThemeChangeSensitive="True">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="48sp, 48sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/previous.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/dark/previous_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/dark/previous_disabled.png"/>
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
-
- <c:ButtonStyle x:Key="NextButton" Size="48sp, 48sp" BackgroundColor="Transparent" ThemeChangeSensitive="True">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="48sp, 48sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/next.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/dark/next_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/dark/next_disabled.png"/>
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
+ <ImageViewStyle x:Key="BackIcon" Size="48sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/back.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/dark/back_pressed.png" />
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+
+ <ImageViewStyle x:Key="PreviousIcon" Size="48sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/previous.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/dark/previous_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/dark/previous_disabled.png"/>
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+
+ <ImageViewStyle x:Key="NextIcon" Size="48sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/next.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/dark/next_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/dark/next_disabled.png"/>
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+
+ <ImageViewStyle x:Key="SaveIcon" Size="234sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/save.png" />
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
<ImageViewStyle x:Key="AlbumIcon" Size="80sp, 80sp">
<ImageViewStyle.ResourceUrl>
</ImageViewStyle.ResourceUrl>
</ImageViewStyle>
- <c:ButtonStyle x:Key="AlbumFolder" Size="114sp, 114sp" IsSelectable="false" IsEnabled="true" ThemeChangeSensitive="True" BackgroundImage="*Resource*/mount/allowed/SettingWallpaper/images/dark/background.png">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="80sp, 80sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/dark/folder.png"/>
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
-
+ <c:ButtonStyle x:Key="AlbumFolder" Size="114sp, 114sp" IsSelectable="false" IsEnabled="true" ThemeChangeSensitive="True" BackgroundImage="*Resource*/mount/allowed/SettingWallpaper/images/dark/background.png"/>
</Theme>
\ No newline at end of file
<TextLabelStyle x:Key="ItemText" TextColor="#090E21" FontFamily="BreezeSans" VerticalAlignment="Center" ThemeChangeSensitive="True"/>
- <c:ButtonStyle x:Key="BackButton" Size="48sp, 48sp" BackgroundColor="Transparent" ThemeChangeSensitive="True">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="48sp, 48sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/back.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/light/back_pressed.png" />
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
-
- <c:ButtonStyle x:Key="PreviousButton" Size="48sp, 48sp" BackgroundColor="Transparent" ThemeChangeSensitive="True">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="48sp, 48sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/previous.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/light/previous_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/light/previous_disabled.png"/>
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
-
- <c:ButtonStyle x:Key="NextButton" Size="48sp, 48sp" BackgroundColor="Transparent" ThemeChangeSensitive="True">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="48sp, 48sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/next.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/light/next_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/light/next_disabled.png"/>
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
+ <ImageViewStyle x:Key="BackIcon" Size="48sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/back.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/light/back_pressed.png" />
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+
+ <ImageViewStyle x:Key="PreviousIcon" Size="48sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/previous.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/light/previous_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/light/previous_disabled.png"/>
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+
+ <ImageViewStyle x:Key="NextIcon" Size="48sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/next.png" Pressed="*Resource*/mount/allowed/SettingWallpaper/images/light/next_pressed.png" Disabled="*Resource*/mount/allowed/SettingWallpaper/images/light/next_disabled.png"/>
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+
+ <ImageViewStyle x:Key="SaveIcon" Size="234sp, 48sp">
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/save.png" />
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
<ImageViewStyle x:Key="AlbumIcon" Size="80sp, 80sp">
<ImageViewStyle.ResourceUrl>
</ImageViewStyle.ResourceUrl>
</ImageViewStyle>
- <c:ButtonStyle x:Key="AlbumFolder" Size="114sp, 114sp" IsSelectable="false" IsEnabled="true" ThemeChangeSensitive="True" BackgroundImage="*Resource*/mount/allowed/SettingWallpaper/images/light/background.png">
- <c:ButtonStyle.Icon>
- <ImageViewStyle Size="80sp, 80sp">
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/mount/allowed/SettingWallpaper/images/light/folder.png"/>
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:ButtonStyle.Icon>
- </c:ButtonStyle>
+ <c:ButtonStyle x:Key="AlbumFolder" Size="114sp, 114sp" IsSelectable="false" IsEnabled="true" ThemeChangeSensitive="True" BackgroundImage="*Resource*/mount/allowed/SettingWallpaper/images/light/background.png"/>
</Theme>
\ No newline at end of file