--- /dev/null
+using System;
+using Tizen.Applications;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace NUIBrokerSample
+{
+ class Program : NUIApplication
+ {
+ private UICreator uiCreator;
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ Initialize();
+ }
+
+ void Initialize()
+ {
+ Window.Instance.KeyEvent += OnKeyEvent;
+ Window.Instance.BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1.0f);
+
+ uiCreator = new UICreator(this);
+ uiCreator.CreateUI();
+
+ TransitionOptions = new TransitionOptions(GetDefaultWindow());
+ TransitionOptions.EnableTransition = true;
+ TransitionOptions.ForwardAnimation = new SlideIn(1300);
+ TransitionOptions.BackwardAnimation = new SlideOut(1300);
+
+ //(launchBroker as SeamlessAnimator)?.SetUICreator(uiCreator);
+ }
+
+
+ protected override void OnPause()
+ {
+ base.OnPause();
+ }
+
+
+ public static string GetResourcePath()
+ {
+ return Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+ }
+
+ public void OnKeyEvent(object sender, Window.KeyEventArgs e)
+ {
+ if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
+ {
+ Exit();
+ }
+ }
+
+ static void Main(string[] args)
+ {
+ new Program().Run(args);
+ }
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Folder Include="lib\" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.1" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
+ </ItemGroup>
+
+</Project>
+
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace NUIBrokerSample
+{
+ class SeamlessAnimation : TransitionAnimation
+ {
+ private Size DEFAULT_POPUP_SIZE = new Size(470, 600);
+
+ private Window window;
+
+ private Position DefaultIconPos;
+ private Position DefaultAddIconPos;
+ private Position DefaultMainPos;
+ private Position DefaultSubPos;
+ private Position DefaultMainViewPos;
+
+ private ImageView imgView = null;
+ private Animation transitionAnimation = null;
+ private bool isForward = false;
+
+
+ private UICreator uiCreator;
+
+ public SeamlessAnimation(int durationMilliSeconds) : base(durationMilliSeconds)
+ {
+ }
+
+ protected void TestAnimation()
+ {
+ DestroyImagView();
+ ResetAnimation();
+// ResetImageView(frame.Image);
+
+ isForward = true;
+ if (isForward == true)
+ {
+ StoreInitDate();
+
+ transitionAnimation.AnimateTo(uiCreator.AnimationView, "Size", new Size(window.Size), 50, 600);
+ transitionAnimation.AnimateTo(uiCreator.AnimationView, "Position", new Position(0, 0), 50, 600);
+ transitionAnimation.AnimateTo(imgView, "Size", new Size(window.Size), 200, 600);
+
+ transitionAnimation.AnimateTo(uiCreator.IconView, "Position", new Position(0, 150), 0, 300);
+ transitionAnimation.AnimateTo(uiCreator.AddView, "Position", new Position(30, 180), 0, 300);
+
+ transitionAnimation.AnimateTo(uiCreator.IconView, "Scale", new Vector3(1.3f, 1.3f, 1.0f), 0, 300);
+ transitionAnimation.AnimateTo(uiCreator.AddView, "Scale", new Vector3(0.7f, 0.7f, 1.0f), 0, 300);
+
+ uiCreator.MainView.Hide();
+ uiCreator.MainProfileText.Hide();
+ uiCreator.SubProfileText.Hide();
+ }
+ else
+ {
+ transitionAnimation.AnimateTo(uiCreator.AnimationView, "Size", DEFAULT_POPUP_SIZE, 50, 600);
+ transitionAnimation.AnimateTo(uiCreator.AnimationView, "Position", DefaultMainViewPos, 50, 600);
+ transitionAnimation.AnimateTo(imgView, "Size", DEFAULT_POPUP_SIZE, 200, 600);
+
+ transitionAnimation.AnimateTo(uiCreator.IconView, "Position", DefaultIconPos, 400, 600);
+ transitionAnimation.AnimateTo(uiCreator.AddView, "Position", DefaultAddIconPos, 400, 600);
+
+ transitionAnimation.AnimateTo(uiCreator.IconView, "Scale", new Vector3(1.0f, 1.0f, 1.0f), 400, 600);
+ transitionAnimation.AnimateTo(uiCreator.IconView, "Scale", new Vector3(1.0f, 1.0f, 1.0f), 400, 600);
+
+ }
+
+ transitionAnimation.Finished += Ani_Finished;
+ transitionAnimation.Play();
+ //StartAnimation();
+ }
+
+ private void Ani_Finished(object sender, EventArgs e)
+ {
+ //FinishAnimation();
+ Timer timer = new Timer(30);
+ timer.Tick += Timer_Tick;
+ timer.Start();
+ }
+
+ private bool Timer_Tick(object source, Timer.TickEventArgs e)
+ {
+ DestroyImagView();
+ if (!isForward)
+ {
+ uiCreator.MainView.Show();
+ uiCreator.MainProfileText.Show();
+ uiCreator.SubProfileText.Show();
+ }
+ return false;
+ }
+
+ private void ResetAnimation()
+ {
+ if (transitionAnimation != null)
+ {
+ transitionAnimation.Reset();
+ transitionAnimation.Clear();
+ transitionAnimation.Dispose();
+ transitionAnimation = null;
+ }
+ transitionAnimation = new Animation(600);
+ transitionAnimation.DefaultAlphaFunction = GetSineInOut80();
+ }
+
+ private void DestroyImagView()
+ {
+ if(imgView != null)
+ {
+ imgView.LowerToBottom();
+ imgView.Hide();
+ imgView.Unparent();
+ imgView.Dispose();
+ imgView = null;
+ }
+ }
+
+ private void ResetImageView(ImageView imgFrame)
+ {
+ imgView = imgFrame;
+ imgView.ParentOrigin = ParentOrigin.TopCenter;
+ imgView.PivotPoint = PivotPoint.TopCenter;
+ imgView.PositionUsesPivotPoint = true;
+ imgView.CornerRadius = 50.0f;
+
+ uiCreator.AnimationView.Add(imgView);
+ imgView.LowerToBottom();
+ }
+
+ private void StoreInitDate()
+ {
+ DefaultIconPos = uiCreator.IconView.Position;
+ DefaultAddIconPos = uiCreator.AddView.Position;
+ DefaultMainPos = uiCreator.MainProfileText.Position;
+ DefaultSubPos = uiCreator.SubProfileText.Position;
+ DefaultMainViewPos = uiCreator.MainView.Position;
+
+ imgView.Size = DEFAULT_POPUP_SIZE;
+ uiCreator.AnimationView.Size = DEFAULT_POPUP_SIZE;
+ }
+
+ internal AlphaFunction GetSineInOut80()
+ {
+ return new AlphaFunction(new Vector2(0.45f, 0.43f), new Vector2(0.41f, 1.0f));
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Tizen.Applications;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace NUIBrokerSample
+{
+ class UICreator
+ {
+ private Color MAIN_TEXT_COLOR = new Color(0.95f, 0.95f, 0.95f, 1.0f);
+ private Color SUB_TEXT_COLOR = new Color(0.70f, 0.70f, 0.70f, 1.0f);
+ private Color INFO_TEXT_COLOR = new Color(0.3f, 0.3f, 0.3f, 1.0f);
+
+ private Color CONTENTS_TEXT_COLOR = new Color(0.6f, 0.6f, 0.6f, 1.0f);
+
+ private float MAIN_TEXT_POINT_SIZE;
+ private float PROFILE_TEXT_POINT_SIZE;
+ private float SUB_TEXT_POINT_SIZE;
+
+ private float INFO_TEXT_POINT_SIZE;
+ private float CONTENTS_TEXT_POINT_SIZE;
+
+ public View AnimationView;
+ public View IconView;
+ public View AddView;
+
+ public View MainView;
+
+ public TextLabel MainProfileText;
+ public TextLabel SubProfileText;
+
+ //Touch/Launching Animation
+ public bool isStartingProcess = false;
+ private Vector2 prePos = new Vector2(0, 0);
+ private Vector2 firstPos = new Vector2(0, 0);
+ private Animation startAni;
+
+ private NUIApplication application;
+
+ public UICreator(NUIApplication app)
+ {
+ application = app;
+ CreateMobileSize();
+ }
+ private void CreateMobileSize()
+ {
+ MAIN_TEXT_POINT_SIZE = 8.0f;
+ PROFILE_TEXT_POINT_SIZE = 6.0f;
+ SUB_TEXT_POINT_SIZE = 3.0f;
+
+ INFO_TEXT_POINT_SIZE = 3.0f;
+ CONTENTS_TEXT_POINT_SIZE = 3.0f;
+ }
+
+
+ private void CreateFHubSize()
+ {
+ MAIN_TEXT_POINT_SIZE = 32.0f;
+ PROFILE_TEXT_POINT_SIZE = 14.0f;
+ SUB_TEXT_POINT_SIZE = 11.0f;
+
+ INFO_TEXT_POINT_SIZE = 13.0f;
+ CONTENTS_TEXT_POINT_SIZE = 12.0f;
+ }
+
+ public void CreateUI()
+ {
+ ImageView bgView = new ImageView()
+ {
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/familyboard_setting_bg1.png",
+ Size = new Size(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height),
+ };
+
+ Window.Instance.Add(bgView);
+ MainView = new View()
+ {
+ Size = new Size(470, 600),
+ //Size = new Size(50, 50),
+ BackgroundColor = Color.Black,
+ CornerRadius = 10.0f,
+ Position = new Position(-50, 500),
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ PositionUsesPivotPoint = true,
+ };
+
+
+ Window.Instance.Add(MainView);
+ AnimationView = new View()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.TopCenter,
+ PositionUsesPivotPoint = true,
+ Size = new Size(470, 600),
+ Position = new Position(-50, 500),
+ };
+ Window.Instance.Add(AnimationView);
+ MainView.TouchEvent += View_TouchEvent; ;
+
+
+ ImageView imgView = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.BottomCenter,
+ PivotPoint = PivotPoint.BottomCenter,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/pic_1.jpg",
+ //Position = new Position(0, -30, 0),
+ Size = new Size(360, 360),
+ };
+ MainView.Add(imgView);
+
+ TextLabel contents = new TextLabel()
+ {
+ Text = "Beautiful, dreamy and dramtic\n instrumental neo classical piano scores\n from movies and tv series.\n",
+ MultiLine = true,
+ TextColor = CONTENTS_TEXT_COLOR,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ PointSize = CONTENTS_TEXT_POINT_SIZE,
+ Position = new Position(0, 250, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ Opacity = 0.0f,
+ };
+ MainView.Add(contents);
+
+ CreateTopProfile(MainView);
+
+ PropertyMap map = new PropertyMap();
+ map.Insert("weight", new PropertyValue("bold"));
+
+ TextLabel text = new TextLabel("Cinematic Piano")
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ TextColor = MAIN_TEXT_COLOR,
+ PointSize = MAIN_TEXT_POINT_SIZE,
+ Position = new Position(0, 150, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ FontStyle = map,
+ };
+ MainView.Add(text);
+
+ CreateInfo(MainView);
+
+ View play_btn = new View()
+ {
+ ParentOrigin = ParentOrigin.BottomCenter,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.White,
+ Position = new Position(0, -40),
+ Size = new Size(52, 52),
+ CornerRadius = 26.0f,
+ };
+
+ ImageView play_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/play-128.png",
+ Color = Color.Black,
+ Size = new Size(20, 20),
+ };
+
+ play_btn.Add(play_icon);
+ MainView.Add(play_btn);
+ }
+
+
+ public void CreateTopProfile(View view)
+ {
+ IconView = new View()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.White,
+ Position = new Position(-160, 80, 0),
+ Size = new Size(76, 76, 0),
+ CornerRadius = 38.0f,
+ };
+
+ View profileContainer_inner = new View()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.Black,
+ Size = new Size(74, 74, 0),
+ CornerRadius = 37.0f,
+ };
+
+ ImageView profileImage = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/profile.jpg",
+ Size = new Size(62, 62, 0),
+ CornerRadius = 31.0f,
+ };
+ IconView.Add(profileContainer_inner);
+ profileContainer_inner.Add(profileImage);
+ AnimationView.Add(IconView);
+
+ PropertyMap map = new PropertyMap();
+ map.Insert("weight", new PropertyValue("bold"));
+ MainProfileText = new TextLabel("PIANO DAILY")
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ TextColor = MAIN_TEXT_COLOR,
+ PointSize = PROFILE_TEXT_POINT_SIZE,
+ Position = new Position(0, 60, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ FontStyle = map,
+ };
+ AnimationView.Add(MainProfileText);
+ SubProfileText = new TextLabel("July 2020")
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ TextColor = SUB_TEXT_COLOR,
+ PointSize = SUB_TEXT_POINT_SIZE,
+ Position = new Position(0, 90, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ AnimationView.Add(SubProfileText);
+
+
+
+ AddView = new View()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.White,
+ Position = new Position(160, 80),
+ Size = new Size(60, 60),
+ CornerRadius = 30.0f,
+ };
+ ImageView add_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/add.png",
+ Size = new Size(15, 15),
+ };
+ AddView.Add(add_icon);
+ AnimationView.Add(AddView);
+ }
+
+ public void CreateInfo(View view)
+ {
+ int posY = 210;
+ TextLabel info1 = new TextLabel()
+ {
+ Text = "9,465\n",
+ TextColor = INFO_TEXT_COLOR,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ PointSize = INFO_TEXT_POINT_SIZE,
+ Position = new Position(-35, posY, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ view.Add(info1);
+ ImageView info1_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/bar-chart-5-128.png",
+ Color = INFO_TEXT_COLOR,
+ Position = new Position(-85, posY, 0),
+ Size = new Size(15, 15),
+ };
+ view.Add(info1_icon);
+
+
+ TextLabel info2 = new TextLabel()
+ {
+ Text = "5h 35m\n",
+ TextColor = INFO_TEXT_COLOR,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ PointSize = INFO_TEXT_POINT_SIZE,
+ Position = new Position(65, posY, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ view.Add(info2);
+
+ ImageView info2_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/clock-128.png",
+ Color = INFO_TEXT_COLOR,
+ Position = new Position(10, posY, 0),
+ Size = new Size(15, 15),
+ };
+ //view.Add(info2_icon);
+
+ }
+ private bool View_TouchEvent(object source, View.TouchEventArgs e)
+ {
+
+ if (e.Touch.GetState(0) == PointStateType.Down)
+ {
+ prePos = e.Touch.GetScreenPosition(0);
+ firstPos = prePos;
+
+ startAni = new Animation(150);
+ startAni.AnimateTo(MainView, "Scale", new Vector3(0.9f, 0.9f, 1.0f));
+ startAni.AnimateTo(AnimationView, "Scale", new Vector3(0.9f, 0.9f, 1.0f));
+ startAni.Play();
+ }
+ else if (e.Touch.GetState(0) == PointStateType.Motion)
+ {
+ Vector2 curPos = e.Touch.GetScreenPosition(0);
+ float moveX = curPos.X - prePos.X;
+ float moveY = curPos.Y - prePos.Y;
+ Position mPos = MainView.Position;
+ MainView.Position = new Position(mPos.X + moveX, mPos.Y + moveY);
+ AnimationView.Position = new Position(mPos.X + moveX, mPos.Y + moveY);
+
+ prePos = curPos;
+ }
+ else if (e.Touch.GetState(0) == PointStateType.Up)
+ {
+ Vector2 curPos = e.Touch.GetScreenPosition(0);
+ float moveX = Math.Abs(curPos.X - firstPos.X);
+ float moveY = Math.Abs(curPos.Y - firstPos.Y);
+
+ if (moveX < 5 && moveY < 5 && !isStartingProcess)
+ {
+ Tizen.Log.Error("MYLOG", "launch app");
+ launchApplication();
+ }
+ if (startAni != null)
+ {
+ startAni.Clear();
+ startAni.Dispose();
+ startAni = null;
+ }
+ startAni = new Animation(150);
+ startAni.AnimateTo(MainView, "Scale", new Vector3(1.0f, 1.0f, 1.0f));
+ startAni.AnimateTo(AnimationView, "Scale", new Vector3(1.0f, 1.0f, 1.0f));
+ startAni.Play();
+ }
+
+ return true;
+ }
+
+ private void launchApplication()
+ {
+ AppControl appControl = new AppControl();
+ appControl.ApplicationId = "org.tizen.example.NUIMusicPlayer";
+ application.SendLaunchRequest(appControl);
+ }
+
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest package="org.tizen.example.NUIBrokerSample" version="1.0.0" api-version="5" xmlns="http://tizen.org/ns/packages">
+ <profile name="common" />
+ <ui-application appid="org.tizen.example.NUIBrokerSample" exec="NUIBrokerSample.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet-nui" launch_mode="single">
+ <label>NUIBrokerSample</label>
+ <icon>NUIBrokerSample.png</icon>
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+ <splash-screens />
+ </ui-application>
+ <shortcut-list />
+ <privileges>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ </privileges>
+ <dependencies />
+ <provides-appdefined-privileges />
+</manifest>
--- /dev/null
+using System;
+using Tizen.Applications;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace NUIMusicPlayer
+{
+ class Program : NUIApplication
+ {
+ private UICreator uiCreator;
+
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ Initialize();
+ }
+
+ void Initialize()
+ {
+ Window.Instance.KeyEvent += OnKeyEvent;
+ uiCreator = new UICreator();
+ uiCreator.CreateUI();
+
+ TransitionOptions = new TransitionOptions(GetDefaultWindow());
+ TransitionOptions.EnableTransition = true;
+
+ }
+
+ protected void OnResumed()
+ {
+ base.OnResume();
+ uiCreator.ShowObjects();
+ }
+
+ public void OnKeyEvent(object sender, Window.KeyEventArgs e)
+ {
+ if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
+ {
+ uiCreator.HideObjects();
+ //Window.Instance.SetIconified(true);
+ Exit();
+ }
+ }
+
+ static void Main(string[] args)
+ {
+ var app = new Program();
+ app.Run(args);
+ }
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Folder Include="lib\" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.1" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
+ </ItemGroup>
+
+</Project>
+
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace NUIMusicPlayer
+{
+ public class UICreator
+ {
+ private Color MAIN_TEXT_COLOR = new Color(0.95f, 0.95f, 0.95f, 1.0f);
+ private Color INFO_TEXT_COLOR = new Color(0.3f, 0.3f, 0.3f, 1.0f);
+ private Color CONTENTS_TEXT_COLOR = new Color(0.4f, 0.4f, 0.4f, 1.0f);
+ private Color SUB_TEXT_COLOR = new Color(0.70f, 0.70f, 0.70f, 1.0f);
+
+ private float MAIN_TEXT_POINT_SIZE;
+ private float INFO_TEXT_POINT_SIZE;
+ private float PROFILE_TEXT_POINT_SIZE;
+ private float CONTENTS_TEXT_POINT_SIZE;
+
+ private float SUB_TEXT_POINT_SIZE;
+
+ private View profileContainer;
+ private View add_container;
+
+ private TextLabel profile_text1;
+ private TextLabel profile_text2;
+
+ public UICreator()
+ {
+ //CreateFHubSize();
+ CreateMobileSize();
+ }
+ public void CreateMobileSize()
+ {
+ MAIN_TEXT_POINT_SIZE = 16.0f;
+ INFO_TEXT_POINT_SIZE = 5.0f;
+ PROFILE_TEXT_POINT_SIZE = 5.0f;
+ CONTENTS_TEXT_POINT_SIZE = 7.0f;
+
+ SUB_TEXT_POINT_SIZE = 4.0f;
+ }
+
+
+ public void CreateFHubSize()
+ {
+ MAIN_TEXT_POINT_SIZE = 70.0f;
+ INFO_TEXT_POINT_SIZE = 20.0f;
+ PROFILE_TEXT_POINT_SIZE = 20.0f;
+ CONTENTS_TEXT_POINT_SIZE = 30.0f;
+
+ SUB_TEXT_POINT_SIZE = 13.0f;
+ }
+
+ public void CreateUI()
+ {
+
+ View view = new View()
+ {
+ Size = new Size(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height, 0),
+ BackgroundColor = Color.Black,
+ };
+ Window.Instance.GetDefaultLayer().Add(view);
+
+ profileContainer = new View()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.White,
+ Position = new Position(0, 150, 0),
+ Size = new Size(96, 96, 0),
+ CornerRadius = 48.0f,
+ };
+
+ View profileContainer_inner = new View()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.Black,
+ Size = new Size(94, 94, 0),
+ CornerRadius = 47.0f,
+ };
+
+ ImageView profileImage = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/profile.jpg",
+ Size = new Size(80, 80, 0),
+ CornerRadius = 40.0f,
+ };
+ profileContainer.Add(profileContainer_inner);
+ profileContainer_inner.Add(profileImage);
+ view.Add(profileContainer);
+
+ add_container = new View()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.White,
+ Position = new Position(33, 183),
+ Size = new Size(40, 40),
+ CornerRadius = 20.0f,
+ };
+ ImageView add_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/add.png",
+ Size = new Size(16, 16),
+ };
+ add_container.Add(add_icon);
+ view.Add(add_container);
+
+ ImageView back_btn = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.BottomLeft,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/arrow-89-128.png",
+ Position = new Position(50, -60),
+ Size = new Size(40, 40),
+ };
+ back_btn.TouchEvent += Back_btn_TouchEvent;
+ view.Add(back_btn);
+
+ profile_text1 = new TextLabel("PIANO DAILY")
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ TextColor = MAIN_TEXT_COLOR,
+ PointSize = PROFILE_TEXT_POINT_SIZE,
+ Position = new Position(0, 207, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ view.Add(profile_text1);
+
+ profile_text2 = new TextLabel("July 2020")
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ TextColor = SUB_TEXT_COLOR,
+ PointSize = SUB_TEXT_POINT_SIZE,
+ Position = new Position(0, 230, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ view.Add(profile_text2);
+
+
+ TextLabel info1 = new TextLabel()
+ {
+ Text = "9,465\n",
+ TextColor = INFO_TEXT_COLOR,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ PointSize = INFO_TEXT_POINT_SIZE,
+ Position = new Position(-65, 400, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ view.Add(info1);
+ ImageView info1_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/bar-chart-5-128.png",
+ Color = INFO_TEXT_COLOR,
+ Position = new Position(-125, 405, 0),
+ Size = new Size(18, 18),
+ };
+ view.Add(info1_icon);
+
+
+ TextLabel info2 = new TextLabel()
+ {
+ Text = "5h 35m\n",
+ TextColor = INFO_TEXT_COLOR,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ PointSize = INFO_TEXT_POINT_SIZE,
+ Position = new Position(65, 400, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ view.Add(info2);
+
+ ImageView info2_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.TopCenter,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/clock-128.png",
+ Color = INFO_TEXT_COLOR,
+ Position = new Position(-2, 405, 0),
+ Size = new Size(18, 18),
+ };
+ view.Add(info2_icon);
+
+
+
+ PropertyMap map = new PropertyMap();
+ map.Insert("weight", new PropertyValue("bold"));
+
+ TextLabel text = new TextLabel("Cinematic Piano")
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ TextColor = MAIN_TEXT_COLOR,
+ PointSize = MAIN_TEXT_POINT_SIZE,
+ Position = new Position(0, 280, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ FontStyle = map,
+ };
+ view.Add(text);
+
+ ImageView imgView = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.BottomCenter,
+ PivotPoint = PivotPoint.BottomCenter,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/pic_1.jpg",
+ //Position = new Position(0, -30, 0),
+ Size = new Size(850, 850),
+ };
+ view.Add(imgView);
+
+
+ TextLabel contents = new TextLabel()
+ {
+ Text = "Beautiful, dreamy and dramtic\n instrumental neo classical piano scores\n from movies and tv series.\n",
+ MultiLine = true,
+ TextColor = CONTENTS_TEXT_COLOR,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ PointSize = CONTENTS_TEXT_POINT_SIZE,
+ Position = new Position(0, 500, 0),
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ };
+ view.Add(contents);
+
+
+ View play_btn = new View()
+ {
+ ParentOrigin = ParentOrigin.BottomCenter,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ BackgroundColor = Color.White,
+ Position = new Position(0, -70),
+ Size = new Size(88, 88),
+ CornerRadius = 44.0f,
+ };
+
+
+ ImageView play_icon = new ImageView()
+ {
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ ResourceUrl = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "images/play-128.png",
+ Color = Color.Black,
+ Size = new Size(26, 26),
+ };
+
+ play_btn.Add(play_icon);
+ view.Add(play_btn);
+ }
+
+ private bool Back_btn_TouchEvent(object source, View.TouchEventArgs e)
+ {
+ if(e.Touch.GetState(0) == PointStateType.Up)
+ {
+ //HideObjects();
+ //Window.Instance.SetIconified(true);
+ //Exit();
+ }
+ return false;
+ }
+
+ public void HideObjects()
+ {
+ profileContainer.Hide();
+ add_container.Hide();
+ profile_text1.Hide();
+ profile_text2.Hide();
+ }
+
+ public void ShowObjects()
+ {
+ profileContainer.Show();
+ add_container.Show();
+ profile_text1.Show();
+ profile_text2.Show();
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5" package="org.tizen.example.NUIMusicPlayer" version="1.0.0">
+ <profile name="common" />
+ <ui-application appid="org.tizen.example.NUIMusicPlayer"
+ exec="NUIMusicPlayer.dll"
+ type="dotnet-nui"
+ multiple="false"
+ taskmanage="true"
+ nodisplay="false"
+ launch_mode="single">
+ <label>NUIMusicPlayer</label>
+ <icon>NUIMusicPlayer.png</icon>
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+ </ui-application>
+</manifest>