--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29613.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.NUI.Samples", "Tizen.NUI.Samples\Tizen.NUI.Samples.csproj", "{B2EC3963-C77F-4D1A-9387-8BA0DB298266}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {118813F7-AD71-497A-B9AB-443A89F48D34}
+ EndGlobalSection
+EndGlobal
--- /dev/null
+namespace Tizen.NUI.Samples
+{
+ interface IExample
+ {
+ void Activate();
+ void Deactivate();
+ }
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+
+namespace Tizen.NUI.Samples
+{
+ public class Application
+ {
+ [STAThread]
+ static void Main(string[] args)
+ {
+ new DaliDemo(CommonResource.GetDaliResourcePath() + @"../../style/demo-theme.json").Run(args);
+ }
+ }
+}
+
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class CommonResource
+ {
+ public static string GetDaliResourcePath()
+ {
+ return @"/opt/usr/globalapps/org.tizen.example.Tizen.NUI.Samples/res/images/Dali/";
+ }
+
+ public static string GetFHResourcePath()
+ {
+ return @"/opt/usr/globalapps/org.tizen.example.Tizen.NUI.Samples/res/images/FH3/";
+ }
+
+ public static string GetTVResourcePath()
+ {
+ return @"/opt/usr/globalapps/org.tizen.example.Tizen.NUI.Samples/res/images/VD/";
+ }
+ }
+
+ public class SampleMain : NUIApplication, IExample
+ {
+ public void Activate()
+ {
+ defaultFocusIndicator = new View();
+ defaultFocusIndicator.BackgroundColor = Color.Transparent;
+ FocusManager.Instance.FocusIndicator = defaultFocusIndicator;
+
+ Window.Instance.BackgroundColor = new Color(1.0f, 0.92f, 0.80f, 1.0f);
+ Window.Instance.GetDefaultLayer().Add(container);
+ FocusManager.Instance.SetCurrentFocusView(label[currentIndex]);
+ }
+
+ public void Deactivate()
+ {
+ Window.Instance.BackgroundColor = new Color(0.96f, 0.96f, 0.86f, 1.0f);
+ View currentView = FocusManager.Instance.GetCurrentFocusView();
+ currentIndex = Array.FindIndex(label, x => x == currentView);
+
+ Window.Instance.GetDefaultLayer().Remove(container);
+ }
+
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ container = new FlexContainer();
+ container.Size2D = new Size2D(Window.Instance.Size.Width, Window.Instance.Size.Height);
+ container.PivotPoint = PivotPoint.TopLeft;
+ container.FlexWrap = FlexContainer.WrapType.Wrap;
+ container.FlexDirection = (int)FlexContainer.FlexDirectionType.Column;
+
+ var examples = from type in Assembly.GetEntryAssembly().GetTypes()
+ where typeof(IExample).GetTypeInfo().IsAssignableFrom(type) && type.Namespace == this.GetType().Namespace
+ && type != this.GetType() && type.GetTypeInfo().IsClass
+ orderby type.Name ascending
+ select type.Name;
+
+ label = new MyTextView[examples.Count()];
+ for (int i = 0; i < label.Length; i++)
+ {
+ label[i] = new MyTextView();
+ label[i].Text = examples.ElementAt(i);
+ label[i].Size = new Size(300, 40, 0);
+ label[i].FlexMargin = new Vector4(20, 20, 40, 20);
+ label[i].PointSize = 10;
+ label[i].KeyEvent += SampleMain_KeyEvent;
+ label[i].TouchEvent += SampleMain_TouchEvent;
+ label[i].PivotPoint = PivotPoint.TopLeft;
+ container.Add(label[i]);
+ }
+
+ label.First().UpFocusableView = label.Last();
+ label.Last().DownFocusableView = label.First();
+
+ Window.Instance.KeyEvent += Instance_Key;
+
+ Activate();
+ sampleStack.Push(this);
+ }
+
+ private bool SampleMain_TouchEvent(object source, View.TouchEventArgs e)
+ {
+ TextLabel textLabel = source as TextLabel;
+ string sampleName = textLabel.Text;
+ RunSample("Tizen.NUI.Samples", sampleName);
+ return false; ;
+ }
+
+ public void ExitSample()
+ {
+ if (sampleStack.Count() == 1)
+ {
+ Exit();
+ Environment.Exit(0);
+ return;
+ }
+
+ IExample currentSample = sampleStack.Pop();
+
+ currentSample.Deactivate();
+ currentSample = null;
+
+ FullGC();
+
+ IExample nextSample = sampleStack.Peek();
+ nextSample.Activate();
+ }
+
+ private void Instance_Key(object sender, Window.KeyEventArgs e)
+ {
+ if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "BackSpace" || e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
+ {
+ ExitSample();
+ }
+ }
+ public void RunSample(string @namespace, string sampleName)
+ {
+ object item = Activator.CreateInstance(global::System.Type.GetType(@namespace + "." + sampleName));
+ if (item is IExample)
+ {
+ IExample currentSample = sampleStack.Peek();
+ currentSample.Deactivate();
+
+ FullGC();
+
+ currentSample = item as IExample;
+ sampleStack.Push(currentSample);
+
+ currentSample.Activate();
+ }
+ }
+ private void FullGC()
+ {
+ global::System.GC.Collect();
+ global::System.GC.WaitForPendingFinalizers();
+ global::System.GC.Collect();
+ }
+ private bool SampleMain_KeyEvent(object source, View.KeyEventArgs e)
+ {
+ TextLabel textLabel = source as TextLabel;
+
+ if (e.Key.State == Key.StateType.Down)
+ {
+ if (e.Key.KeyPressedName == "Return")
+ {
+ string sampleName = textLabel.Text;
+
+ RunSample("Tizen.NUI.Samples", sampleName);
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ MyTextView[] label;
+ FlexContainer container;
+ View defaultFocusIndicator;
+ int currentIndex = 0;
+ Stack<IExample> sampleStack = new Stack<IExample>();
+ }
+
+ public class MyTextView : TextLabel
+ {
+ Animation focusInAni;
+ Animation focusOutAni;
+
+ public MyTextView()
+ {
+ this.Focusable = true;
+ this.FocusGained += MyTextView_FocusGained;
+ this.FocusLost += MyTextView_FocusLost;
+
+ focusInAni = new Animation(400);
+ focusOutAni = new Animation(400);
+
+ focusInAni.AnimateTo(this, "Scale", new Vector3(1.2f, 1.2f, 1.0f));
+ focusOutAni.AnimateTo(this, "Scale", new Vector3(1.0f, 1.0f, 1.0f));
+ }
+
+ private void MyTextView_FocusLost(object sender, EventArgs e)
+ {
+ focusOutAni.Play();
+ this.BackgroundColor = Color.Transparent;
+ this.TextColor = Color.Black;
+ }
+
+ private void MyTextView_FocusGained(object sender, EventArgs e)
+ {
+ focusInAni.Play();
+ this.BackgroundColor = new Color(0.69f, 0.77f, 0.87f, 1.0f);
+ this.TextColor = Color.Red;
+ }
+ }
+}
+
--- /dev/null
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class ButtonSample : IExample
+ {
+ private static readonly int XBase = 100;
+ private static readonly int YBase = 300;
+ private static readonly int XPadding = 350;
+ private View root;
+ Button textButton;
+ Button iconButton;
+
+ Button iconTextButton;
+
+ Button utilityBasicButton;
+ Button utilityServiceButton;
+ Button utilityToggleButton;
+ Button utilityOvalButton;
+
+ Button familyBasicButton;
+ Button familyServiceButton;
+ Button familyToggleButton;
+ Button familyOvalButton;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ //ImageView imageView1 = new ImageView();
+ //imageView1.Size2D = new Size2D(48, 48);
+ //imageView1.Position2D = new Position2D(200, 200);
+ //imageView1.ResourceUrl = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check.png";
+ //window.Add(imageView1);
+
+ //ImageView imageView2 = new ImageView();
+ //imageView2.Size2D = new Size2D(48, 48);
+ //imageView2.Position2D = new Position2D(500, 200);
+ //imageView2.ResourceUrl = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_24c447.png";
+ //window.Add(imageView2);
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ };
+ window.Add(root);
+ window.KeyEvent += Window_KeyEvent;
+
+ textButton = new Button();
+ textButton.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png";
+ textButton.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5);
+ textButton.Size2D = new Size2D(300, 80);
+ textButton.Position2D = new Position2D(100, 100);
+ textButton.Style.Text.Text = "Button";
+ root.Add(textButton);
+
+ iconButton = new Button();
+ iconButton.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png";
+ iconButton.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5);
+ iconButton.Size2D = new Size2D(100, 100);
+ iconButton.Position2D = new Position2D(600, 100);
+ iconButton.Style.Icon.ResourceUrl = CommonResource.GetTVResourcePath() + "component/c_radiobutton/c_radiobutton_white_check.png";
+ root.Add(iconButton);
+
+ iconTextButton = new Button();
+ iconTextButton.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png";
+ iconTextButton.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5);
+ iconTextButton.IconRelativeOrientation = Button.IconOrientation.Left;
+ iconTextButton.Style.Icon.ResourceUrl = CommonResource.GetTVResourcePath() + "component/c_radiobutton/c_radiobutton_white_check.png";
+ iconTextButton.Style.IconPadding.Top = 20;
+ iconTextButton.Style.IconPadding.Bottom = 20;
+ iconTextButton.Style.IconPadding.Start = 20;
+ iconTextButton.Style.IconPadding.End = 20;
+ iconTextButton.Style.Text.Text = "IconTextButton";
+ iconTextButton.Style.TextPadding.Top = 20;
+ iconTextButton.Style.TextPadding.Bottom = 20;
+ iconTextButton.Style.TextPadding.Start = 20;
+ iconTextButton.Style.TextPadding.End = 50;
+ iconTextButton.Size2D = new Size2D(500, 300);
+ iconTextButton.Position2D = new Position2D(900, 100);
+ root.Add(iconTextButton);
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ utilityBasicButton = new Button();
+ utilityBasicButton.IsSelectable = true;
+ utilityBasicButton.Style.BackgroundImage = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_normal.png";
+ utilityBasicButton.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
+ utilityBasicButton.Style.Shadow.ResourceUrl = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png";
+ utilityBasicButton.Style.Shadow.Border = new Rectangle(5, 5, 5, 5);
+ utilityBasicButton.Style.Overlay.ResourceUrl = new Selector<string>
+ {
+ Pressed = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_press_overlay.png",
+ Other = ""
+ };
+ utilityBasicButton.Style.Overlay.Border = new Rectangle(5, 5, 5, 5);
+
+ utilityBasicButton.Style.Text.TextColor = new Selector<Color>
+ {
+ Normal = new Color(0, 0, 0, 1),
+ Pressed = new Color(0, 0, 0, 0.7f),
+ Selected = new Color(0.058f, 0.631f, 0.92f, 1),
+ Disabled = new Color(0, 0, 0, 0.4f)
+ };
+
+ utilityBasicButton.Size2D = new Size2D(300, 80);
+ utilityBasicButton.Position2D = new Position2D(XBase, 300);
+ utilityBasicButton.Style.Text.PointSize = 20;
+ utilityBasicButton.Style.Text.Text = "UtilityBasicButton";
+ utilityBasicButton.IsEnabled = false;
+ root.Add(utilityBasicButton);
+
+ /////////////////////////////////////////////////////////////////////////////////////////////////////////
+ utilityServiceButton = new Button();
+ utilityServiceButton.Style.BackgroundImage = CommonResource.GetFHResourcePath() + "3. Button/rectangle_point_btn_normal.png";
+ utilityServiceButton.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
+ utilityServiceButton.Style.Shadow.ResourceUrl = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png";
+ utilityServiceButton.Style.Shadow.Border = new Rectangle(5, 5, 5, 5);
+ utilityServiceButton.Style.Overlay.ResourceUrl = new Selector<string>
+ {
+ Pressed = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_press_overlay.png",
+ Other = ""
+ };
+ utilityServiceButton.Style.Overlay.Border = new Rectangle(5, 5, 5, 5);
+ utilityServiceButton.Style.Text.TextColor = new Selector<Color>
+ {
+ Normal = new Color(1, 1, 1, 1),
+ Pressed = new Color(1, 1, 1, 0.7f),
+ Disabled = new Color(1, 1, 1, 0.4f)
+ };
+
+ utilityServiceButton.Size2D = new Size2D(300, 80);
+ utilityServiceButton.Position2D = new Position2D(XBase, 500);
+ utilityServiceButton.Style.Text.PointSize = 20;
+ utilityServiceButton.Style.Text.Text = "ServiceBasicButton";
+ root.Add(utilityServiceButton);
+ /////////////////////////////////////////////////////////////////////////////////////////////////////////
+ utilityToggleButton = new Button();
+ utilityToggleButton.IsSelectable = true;
+ utilityToggleButton.Style.BackgroundImage = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "3. Button/rectangle_toggle_btn_normal.png",
+ Selected = CommonResource.GetFHResourcePath() + "3. Button/rectangle_point_btn_normal.png",
+ };
+
+ utilityToggleButton.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
+ utilityToggleButton.Style.Shadow.ResourceUrl = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png";
+ utilityToggleButton.Style.Shadow.Border = new Rectangle(5, 5, 5, 5);
+ utilityToggleButton.Style.Overlay.ResourceUrl = new Selector<string>
+ {
+ Pressed = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_press_overlay.png",
+ Other = ""
+ };
+ utilityToggleButton.Style.Overlay.Border = new Rectangle(5, 5, 5, 5);
+
+
+ utilityToggleButton.Style.Text.TextColor = new Selector<Color>
+ {
+ Normal = new Color(0.058f, 0.631f, 0.92f, 1),
+ Selected = new Color(1, 1, 1, 1),
+ };
+
+ utilityToggleButton.Size2D = new Size2D(300, 80);
+ utilityToggleButton.Position2D = new Position2D(XBase, 700);
+ utilityToggleButton.Style.Text.PointSize = 20;
+ utilityToggleButton.Style.Text.Text = new Selector<string>
+ {
+ Normal = "Toggle Off",
+ Selected = "Toggle On"
+ };
+ root.Add(utilityToggleButton);
+ /////////////////////////////////////////////////////////////////////////////////////////////////////////
+ utilityOvalButton = new Button();
+ utilityOvalButton.IsSelectable = true;
+ utilityOvalButton.Style.BackgroundImage = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "3. Button/oval_toggle_btn_normal.png",
+ Selected = CommonResource.GetFHResourcePath() + "3. Button/oval_toggle_btn_select.png",
+ };
+ utilityOvalButton.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
+ utilityOvalButton.Style.Shadow.ResourceUrl = CommonResource.GetFHResourcePath() + "3. Button/oval_toggle_btn_shadow.png";
+ utilityOvalButton.Style.Shadow.Border = new Rectangle(5, 5, 5, 5);
+ utilityOvalButton.Style.Overlay.ResourceUrl = new Selector<string>
+ {
+ Pressed = CommonResource.GetFHResourcePath() + "3. Button/oval_toggle_btn_press_overlay.png",
+ Other = ""
+ };
+ utilityOvalButton.Style.Overlay.Border = new Rectangle(5, 5, 5, 5);
+
+ utilityOvalButton.Size2D = new Size2D(104, 104);
+ utilityOvalButton.Position2D = new Position2D(XBase, 900);
+ utilityOvalButton.Style.Text.PointSize = 20;
+ root.Add(utilityOvalButton);
+
+ ///////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ ButtonStyle familyBasicButtonAttributes = new ButtonStyle
+ {
+ IsSelectable = true,
+ BackgroundImage = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_normal.png" },
+ BackgroundImageBorder = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+ Shadow = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) }
+ },
+
+ Overlay = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { Pressed = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_press_overlay.png", Other = "" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+ },
+
+ Text = new TextLabelStyle
+ {
+ PointSize = new Selector<float?> { All = 20 },
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+
+ TextColor = new Selector<Color>
+ {
+ Normal = new Color(0, 0, 0, 1),
+ Pressed = new Color(0, 0, 0, 0.7f),
+ Selected = new Color(0.141f, 0.769f, 0.278f, 1),
+ Disabled = new Color(0, 0, 0, 0.4f),
+ },
+ }
+ };
+ familyBasicButton = new Button(familyBasicButtonAttributes);
+ familyBasicButton.Size2D = new Size2D(300, 80);
+ familyBasicButton.Position2D = new Position2D(XBase + XPadding, 300);
+ familyBasicButton.Style.Text.PointSize = 20;
+ familyBasicButton.Style.Text.Text = "FamilyBasicButton";
+ root.Add(familyBasicButton);
+
+ //////////////////////////////////////////////////////////////////////////////////////////////////
+ ButtonStyle familyServiceButtonAttributes = new ButtonStyle
+ {
+ IsSelectable = false,
+ BackgroundImage = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/[Button] App Primary Color/rectangle_point_btn_normal_24c447.png" },
+ BackgroundImageBorder = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+
+ Shadow = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) }
+ },
+
+ Overlay = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { Pressed = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_press_overlay.png", Other = "" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+ },
+
+ Text = new TextLabelStyle
+ {
+ PointSize = new Selector<float?> { All = 20 },
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+
+ TextColor = new Selector<Color>
+ {
+ Normal = new Color(1, 1, 1, 1),
+ Pressed = new Color(1, 1, 1, 0.7f),
+ Disabled = new Color(1, 1, 1, 0.4f),
+ },
+ }
+ };
+ familyServiceButton = new Button(familyServiceButtonAttributes);
+ familyServiceButton.Size2D = new Size2D(300, 80);
+ familyServiceButton.Position2D = new Position2D(XBase + XPadding, 500);
+ familyServiceButton.Style.Text.PointSize = 20;
+ familyServiceButton.Style.Text.Text = "FamilySeviceButton";
+ root.Add(familyServiceButton);
+ //////////////////////////////////////////////////////////////////////////////////////////////////
+ ButtonStyle familyToggleButtonAttributes = new ButtonStyle
+ {
+ IsSelectable = true,
+ BackgroundImage = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "3. Button/[Button] App Primary Color/rectangle_toggle_btn_normal_24c447.png",
+ Selected = CommonResource.GetFHResourcePath() + "3. Button/[Button] App Primary Color/rectangle_point_btn_normal_24c447.png",
+ },
+ BackgroundImageBorder = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+
+ Shadow = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) }
+ },
+
+ Overlay = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { Pressed = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_press_overlay.png", Other = "" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+ },
+
+ Text = new TextLabelStyle
+ {
+ PointSize = new Selector<float?> { All = 20 },
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+
+ TextColor = new Selector<Color>
+ {
+ Normal = new Color(0.141f, 0.769f, 0.278f, 1),
+ Selected = new Color(1, 1, 1, 1),
+ },
+ }
+ };
+ familyToggleButton = new Button(familyToggleButtonAttributes);
+ familyToggleButton.Size2D = new Size2D(300, 80);
+ familyToggleButton.Position2D = new Position2D(XBase + XPadding, 700);
+ familyToggleButton.Style.Text.PointSize = 20;
+ familyToggleButton.Style.Text.Text = new Selector<string>
+ {
+ Normal = "Toggle Off",
+ Selected = "Toggle On"
+ };
+ root.Add(familyToggleButton);
+ //////////////////////////////////////////////////////////////////////////////////////////////////
+ ButtonStyle familyOvalButtonAttributes = new ButtonStyle
+ {
+ IsSelectable = true,
+ BackgroundImage = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "3. Button/oval_toggle_btn_normal.png",
+ Selected = CommonResource.GetFHResourcePath() + "3. Button/[Button] App Primary Color/oval_toggle_btn_select_24c447.png",
+ },
+ BackgroundImageBorder = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+
+ Shadow = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/oval_toggle_btn_shadow.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) }
+ },
+
+ Overlay = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { Pressed = CommonResource.GetFHResourcePath() + "3. Button/oval_toggle_btn_press_overlay.png", Other = "" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+ },
+ };
+ familyOvalButton = new Button(familyOvalButtonAttributes);
+ familyOvalButton.Size2D = new Size2D(104, 104);
+ familyOvalButton.Position2D = new Position2D(XBase + XPadding, 900);
+ familyOvalButton.Style.Text.PointSize = 20;
+ root.Add(familyOvalButton);
+ }
+
+ private void Window_KeyEvent(object sender, Window.KeyEventArgs e)
+ {
+ if(e.Key.State == Key.StateType.Up)
+ {
+ switch(e.Key.KeyPressedName)
+ {
+ case "1":
+ iconTextButton.IconRelativeOrientation = Button.IconOrientation.Right;
+ break;
+ case "2":
+ iconTextButton.IconRelativeOrientation = Button.IconOrientation.Top;
+ break;
+ case "3":
+ iconTextButton.IconRelativeOrientation = Button.IconOrientation.Bottom;
+ break;
+ case "4":
+ iconTextButton.IconRelativeOrientation = Button.IconOrientation.Left;
+ break;
+ case "5":
+ iconTextButton.Style.Icon.Padding.Start = 50;
+ break;
+ case "6":
+ iconTextButton.Style.Icon.Padding.End = 50;
+ break;
+ case "7":
+ iconTextButton.LayoutDirection = ViewLayoutDirectionType.RTL;
+ break;
+ case "8":
+ iconTextButton.LayoutDirection = ViewLayoutDirectionType.LTR;
+ break;
+ }
+ }
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class CheckBoxSample : IExample
+ {
+ private View root;
+
+ private TextLabel[] createText = new TextLabel[2];
+ private TextLabel[] modeText = new TextLabel[4];
+ private TextLabel[] modeText2 = new TextLabel[4];
+
+ private CheckBox[] utilityCheckBox = new CheckBox[4];
+ private CheckBox[] familyCheckBox = new CheckBox[4];
+ private CheckBox[] foodCheckBox = new CheckBox[4];
+ private CheckBox[] kitchenCheckBox = new CheckBox[4];
+ private CheckBoxGroup[] group = new CheckBoxGroup[4];
+
+ private CheckBox[] utilityCheckBox2 = new CheckBox[4];
+ private CheckBox[] familyCheckBox2 = new CheckBox[4];
+ private CheckBox[] foodCheckBox2 = new CheckBox[4];
+ private CheckBox[] kitchenCheckBox2 = new CheckBox[4];
+ private CheckBoxGroup[] group2 = new CheckBoxGroup[4];
+
+ private static string[] mode = new string[]
+ {
+ "Utility",
+ "Family",
+ "Food",
+ "Kitchen",
+ };
+ public void Activate()
+ {
+ Window window = Window.Instance;
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ BackgroundColor = Color.White,
+ };
+ window.Add(root);
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ createText[0] = new TextLabel();
+ createText[0].Text = "Create CheckBox just by properties";
+ createText[0].TextColor = Color.White;
+ createText[0].Size2D = new Size2D(500, 100);
+ createText[0].Position2D = new Position2D(400, 100);
+ root.Add(createText[0]);
+
+ int num = 4;
+ for (int i = 0; i < num; i++)
+ {
+ group[i] = new CheckBoxGroup();
+ modeText[i] = new TextLabel();
+ modeText[i].Text = mode[i];
+ modeText[i].Size2D = new Size2D(200, 48);
+ modeText[i].Position2D = new Position2D(300 + 200 * i, 200);
+ root.Add(modeText[i]);
+ }
+
+ for (int i = 0; i < num; i++)
+ {
+ utilityCheckBox[i] = new CheckBox();
+ utilityCheckBox[i].Size2D = new Size2D(150, 48);
+ utilityCheckBox[i].Position2D = new Position2D(300, 300 + i * 100);
+ utilityCheckBox[i].Style.Icon.Size = new Size(48, 48);
+ utilityCheckBox[i].Style.Icon.Padding.Start = 0;
+ utilityCheckBox[i].Style.Icon.Padding.End = 0;
+ utilityCheckBox[i].Style.Icon.Padding.Top = 0;
+ utilityCheckBox[i].Style.Icon.Padding.Bottom = 0;
+ utilityCheckBox[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ utilityCheckBox[i].Style.Icon.BackgroundImage = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_on.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_on.png",
+ };
+ utilityCheckBox[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = "",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check.png",
+ Disabled = "",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check.png",
+ };
+ utilityCheckBox[i].Style.Icon.Shadow.ResourceUrl = new Selector<string>
+ {
+ Normal = "",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_shadow.png",
+ Disabled = "",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_shadow.png",
+ };
+
+ //utilityCheckBox[i].Text = "Check" + i;
+ //utilityCheckBox[i].TextAlignment = HorizontalAlignment.Begin;
+ //utilityCheckBox[i].PointSize = 12;
+ //utilityCheckBox[i].TextPaddingLeft = 70;
+
+ group[0].Add(utilityCheckBox[i]);
+ //////
+ familyCheckBox[i] = new CheckBox();
+ familyCheckBox[i].Size2D = new Size2D(48, 48);
+ familyCheckBox[i].Position2D = new Position2D(500, 300 + i * 100);
+ familyCheckBox[i].Style.Icon.Size = new Size(48, 48);
+ familyCheckBox[i].Style.Icon.Padding.Start = 0;
+ familyCheckBox[i].Style.Icon.Padding.End = 0;
+ familyCheckBox[i].Style.Icon.Padding.Top = 0;
+ familyCheckBox[i].Style.Icon.Padding.Bottom = 0;
+ familyCheckBox[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ familyCheckBox[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_24c447.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_24c447.png",
+ };
+
+ group[1].Add(familyCheckBox[i]);
+ /////////
+ foodCheckBox[i] = new CheckBox();
+ foodCheckBox[i].Size2D = new Size2D(48, 48);
+ foodCheckBox[i].Position2D = new Position2D(700, 300 + i * 100);
+ foodCheckBox[i].Style.Icon.Size = new Size(48, 48);
+ foodCheckBox[i].Style.Icon.Padding.Start = 0;
+ foodCheckBox[i].Style.Icon.Padding.End = 0;
+ foodCheckBox[i].Style.Icon.Padding.Top = 0;
+ foodCheckBox[i].Style.Icon.Padding.Bottom = 0;
+ foodCheckBox[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ foodCheckBox[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_ec7510.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_ec7510.png",
+ };
+
+ group[2].Add(foodCheckBox[i]);
+ ////////
+ kitchenCheckBox[i] = new CheckBox();
+ kitchenCheckBox[i].Size2D = new Size2D(48, 48);
+ kitchenCheckBox[i].Position2D = new Position2D(900, 300 + i * 100);
+ kitchenCheckBox[i].Style.Icon.Size = new Size(48, 48);
+ kitchenCheckBox[i].Style.Icon.Padding.Start = 0;
+ kitchenCheckBox[i].Style.Icon.Padding.End = 0;
+ kitchenCheckBox[i].Style.Icon.Padding.Top = 0;
+ kitchenCheckBox[i].Style.Icon.Padding.Bottom = 0;
+
+ kitchenCheckBox[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ kitchenCheckBox[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_9762d9.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_9762d9.png",
+ };
+
+ group[3].Add(kitchenCheckBox[i]);
+
+ root.Add(utilityCheckBox[i]);
+ root.Add(familyCheckBox[i]);
+ root.Add(foodCheckBox[i]);
+ root.Add(kitchenCheckBox[i]);
+ }
+ /////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ createText[1] = new TextLabel();
+ createText[1].Text = "Create CheckBox just by Attributes";
+ createText[1].TextColor = Color.White;
+ createText[1].Size2D = new Size2D(500, 100);
+ createText[1].Position2D = new Position2D(1200, 100);
+ root.Add(createText[1]);
+
+ for (int i = 0; i < num; i++)
+ {
+ group2[i] = new CheckBoxGroup();
+ modeText2[i] = new TextLabel();
+ modeText2[i].Text = mode[i];
+ modeText2[i].Size2D = new Size2D(200, 48);
+ modeText2[i].Position2D = new Position2D(1100 + 200 * i, 200);
+ root.Add(modeText2[i]);
+ }
+
+ ButtonStyle utilityAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ BackgroundImage = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_on.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_on.png",
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = "",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check.png",
+ Disabled = "",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check.png",
+ },
+ Shadow = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string>
+ {
+ Normal = "",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_shadow.png",
+ Disabled = "",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_shadow.png",
+ },
+ },
+ }
+ };
+ ButtonStyle familyAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_24c447.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_24c447.png",
+ },
+ }
+ };
+ ButtonStyle foodAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Position = new Position(0, 0),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_ec7510.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_ec7510.png",
+ },
+ },
+ };
+ ButtonStyle kitchenAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Position = new Position(0, 0),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_9762d9.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_check_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_check_on_9762d9.png",
+ },
+ },
+ };
+ for (int i = 0; i < num; i++)
+ {
+ utilityCheckBox2[i] = new CheckBox(utilityAttrs);
+ utilityCheckBox2[i].Size2D = new Size2D(48, 48);
+ utilityCheckBox2[i].Position2D = new Position2D(1100, 300 + i * 100);
+ group2[0].Add(utilityCheckBox2[i]);
+
+ familyCheckBox2[i] = new CheckBox(familyAttrs);
+ familyCheckBox2[i].Size2D = new Size2D(48, 48);
+ familyCheckBox2[i].Position2D = new Position2D(1300, 300 + i * 100);
+ group2[1].Add(familyCheckBox2[i]);
+
+ foodCheckBox2[i] = new CheckBox(foodAttrs);
+ foodCheckBox2[i].Size2D = new Size2D(48, 48);
+ foodCheckBox2[i].Position2D = new Position2D(1500, 300 + i * 100);
+ group2[2].Add(foodCheckBox2[i]);
+
+ kitchenCheckBox2[i] = new CheckBox(kitchenAttrs);
+ kitchenCheckBox2[i].Size2D = new Size2D(48, 48);
+ kitchenCheckBox2[i].Position2D = new Position2D(1700, 300 + i * 100);
+ group2[3].Add(kitchenCheckBox2[i]);
+
+ root.Add(utilityCheckBox2[i]);
+ root.Add(familyCheckBox2[i]);
+ root.Add(foodCheckBox2[i]);
+ root.Add(kitchenCheckBox2[i]);
+ }
+
+ utilityCheckBox[2].IsEnabled = false;
+ familyCheckBox[2].IsEnabled = false;
+ foodCheckBox[2].IsEnabled = false;
+ kitchenCheckBox[2].IsEnabled = false;
+
+ utilityCheckBox2[2].IsEnabled = false;
+ familyCheckBox2[2].IsEnabled = false;
+ foodCheckBox2[2].IsEnabled = false;
+ kitchenCheckBox2[2].IsEnabled = false;
+
+ utilityCheckBox[3].IsEnabled = false;
+ familyCheckBox[3].IsEnabled = false;
+ foodCheckBox[3].IsEnabled = false;
+ kitchenCheckBox[3].IsEnabled = false;
+ utilityCheckBox[3].IsSelected = true;
+ familyCheckBox[3].IsSelected = true;
+ foodCheckBox[3].IsSelected = true;
+ kitchenCheckBox[3].IsSelected = true;
+
+ utilityCheckBox2[3].IsEnabled = false;
+ familyCheckBox2[3].IsEnabled = false;
+ foodCheckBox2[3].IsEnabled = false;
+ kitchenCheckBox2[3].IsEnabled = false;
+ utilityCheckBox2[3].IsSelected = true;
+ familyCheckBox2[3].IsSelected = true;
+ foodCheckBox2[3].IsSelected = true;
+ kitchenCheckBox2[3].IsSelected = true;
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ int num = 4;
+ for (int i = 0; i < num; i++)
+ {
+ root.Remove(utilityCheckBox[i]);
+ utilityCheckBox[i].Dispose();
+ utilityCheckBox[i] = null;
+
+ root.Remove(familyCheckBox[i]);
+ familyCheckBox[i].Dispose();
+ familyCheckBox[i] = null;
+
+ root.Remove(foodCheckBox[i]);
+ foodCheckBox[i].Dispose();
+ foodCheckBox[i] = null;
+
+ root.Remove(kitchenCheckBox[i]);
+ kitchenCheckBox[i].Dispose();
+ kitchenCheckBox[i] = null;
+
+ root.Remove(modeText[i]);
+ modeText[i].Dispose();
+ modeText[i] = null;
+
+ root.Remove(utilityCheckBox2[i]);
+ utilityCheckBox2[i].Dispose();
+ utilityCheckBox2[i] = null;
+
+ root.Remove(familyCheckBox2[i]);
+ familyCheckBox2[i].Dispose();
+ familyCheckBox2[i] = null;
+
+ root.Remove(foodCheckBox2[i]);
+ foodCheckBox2[i].Dispose();
+ foodCheckBox2[i] = null;
+
+ root.Remove(kitchenCheckBox2[i]);
+ kitchenCheckBox2[i].Dispose();
+ kitchenCheckBox2[i] = null;
+
+ root.Remove(modeText2[i]);
+ modeText2[i].Dispose();
+ modeText2[i] = null;
+ }
+
+ root.Remove(createText[0]);
+ createText[0].Dispose();
+ createText[0] = null;
+ root.Remove(createText[1]);
+ createText[1].Dispose();
+ createText[1] = null;
+
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI.Samples
+{
+ public class ClippedImage
+ {
+ public static float QUAD_GEOMETRY = 1.0f;
+ public static float CIRCLE_GEOMETRY = 0.0f;
+ static float[] circleArray;
+ static float[] quadArray;
+
+ static Geometry geometry = null;
+
+ private static readonly string VERTEX_SHADER =
+ "attribute vec2 aPositionCircle;\n" +
+ "attribute vec2 aPositionQuad;\n" +
+ "uniform float uDelta;\n" +
+ "uniform mat4 uMvpMatrix;\n" +
+ "uniform vec3 uSize;\n" +
+ "\n" +
+ "void main()\n" +
+ "{\n" +
+ " vec4 vertexPosition = vec4(mix(aPositionCircle, aPositionQuad, uDelta), 0.0, 1.0);\n" +
+ " vertexPosition.xyz *= uSize;\n" +
+ " gl_Position = uMvpMatrix * vertexPosition;\n" +
+ "}\n";
+
+ private static readonly string FRAGMENT_SHADER =
+ "precision mediump float;\n" +
+ "void main()\n" +
+ "{\n" +
+ " gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n" +
+ "}\n";
+
+ public static View Create(string imagePath )
+ {
+ // Create a view which whose geometry will be morphed between a circle and a quad
+ View clippedImage = new View();
+ clippedImage.ClippingMode = ClippingModeType.ClipChildren;
+
+ // Create the required renderer and add to the clipped image view
+ Shader shader = CreateShader();
+ CreateGeometry();
+ Renderer renderer = new Renderer(geometry, shader);
+ renderer.BlendMode = 2;
+ clippedImage.AddRenderer(renderer);
+
+ // Register the property on the clipped image view which will allow animations between a circle and a quad
+ int propertyIndex = clippedImage.RegisterProperty("uDelta", new PropertyValue(0.0f));
+
+ // Add the actual image to the control
+ View image = new ImageView(imagePath);
+ image.WidthResizePolicy = ResizePolicyType.FillToParent;
+ image.HeightResizePolicy = ResizePolicyType.FillToParent;
+ image.ParentOrigin = ParentOrigin.Center;
+ image.PivotPoint = PivotPoint.Center;
+ image.PositionUsesPivotPoint = true;
+ clippedImage.Add(image);
+
+ return clippedImage;
+ }
+
+ private static Shader CreateShader()
+ {
+ Shader shader = new Shader(VERTEX_SHADER, FRAGMENT_SHADER);
+
+ return shader;
+ }
+
+ private static void CreateGeometry()
+ {
+ if(geometry == null)
+ {
+ geometry = new Geometry();
+
+ const int vertexCount = 34;
+
+ circleArray = new float[vertexCount * 2];
+ quadArray = new float[vertexCount * 2];
+
+ // Create the circle geometry
+
+ // Radius is bound to actor's dimensions so this should not be increased.
+ // If a bigger circle is required then the actor size should be increased.
+ const float radius = 0.5f;
+ Vector2 center = new Vector2(0.0f, 0.0f);
+
+ // Create a buffer for vertex data
+ Vector2[] circleBuffer = new Vector2[vertexCount];
+ int idx = 0;
+
+ // Center vertex for triangle fan
+ circleBuffer[idx++] = center;
+
+ // Outer vertices of the circle
+ const int outerVertexCount = vertexCount - 1;
+
+ for (int i = 0; i < outerVertexCount; ++i)
+ {
+ float percent = (i / (float)(outerVertexCount - 1));
+ float rad = percent * 2.0f * (float)Math.PI;
+
+ // Vertex position
+ Vector2 tmpvec = new Vector2(0, 0);
+ tmpvec.X = (float)(center.X + radius * Math.Cos(rad));
+ tmpvec.Y = (float)(center.Y + radius * Math.Sin(rad));
+
+ circleBuffer[idx++] = tmpvec;
+ }
+
+ for(int i = 0; i < idx; i++)
+ {
+ circleArray[i * 2] = circleBuffer[i].X;
+ circleArray[i * 2 + 1] = circleBuffer[i].Y;
+ }
+
+ PropertyMap circleVertexFormat = new PropertyMap();
+ circleVertexFormat.Add("aPositionCircle", new PropertyValue((int)PropertyType.Vector2));
+ PropertyBuffer circleVertices = new PropertyBuffer(circleVertexFormat);
+
+ unsafe
+ {
+ float* pc = (float*)Marshal.UnsafeAddrOfPinnedArrayElement(circleArray, 0);
+ IntPtr pA = new IntPtr(pc);
+ circleVertices.SetData(pA, vertexCount);
+ }
+
+
+ // Create the Quad Geometry
+ Vector2[] quadBuffer = new Vector2[vertexCount];
+ idx = 0;
+ quadBuffer[idx++] = new Vector2(center.X, center.Y);
+
+ const int vertsPerSide = (vertexCount - 2) / 4;
+ Vector2 outer = new Vector2(0.5f, 0.0f);
+ quadBuffer[idx++] = new Vector2(outer.X, outer.Y);
+ float incrementPerBuffer = 1.0f / (float)(vertsPerSide);
+
+ for (int i = 0; i < vertsPerSide && outer.Y < 0.5f; ++i)
+ {
+ outer.Y += incrementPerBuffer;
+ quadBuffer[idx++] = new Vector2(outer.X, outer.Y);
+ }
+
+ for (int i = 0; i < vertsPerSide && outer.X > -0.5f; ++i)
+ {
+ outer.X -= incrementPerBuffer;
+ quadBuffer[idx++] = new Vector2(outer.X, outer.Y);
+ }
+
+ for (int i = 0; i < vertsPerSide && outer.Y > -0.5f; ++i)
+ {
+ outer.Y -= incrementPerBuffer;
+ quadBuffer[idx++] = new Vector2(outer.X, outer.Y);
+ }
+
+ for (int i = 0; i < vertsPerSide && outer.X < 0.5f; ++i)
+ {
+ outer.X += incrementPerBuffer;
+ quadBuffer[idx++] = new Vector2(outer.X, outer.Y);
+ }
+
+ for (int i = 0; i < vertsPerSide && outer.Y < 0.0f; ++i)
+ {
+ outer.Y += incrementPerBuffer;
+ quadBuffer[idx++] = new Vector2(outer.X, outer.Y);
+ }
+
+ for(int i = 0; i < idx; i++)
+ {
+ quadArray[i * 2] = quadBuffer[i].X;
+ quadArray[i * 2 + 1] = quadBuffer[i].Y;
+ }
+
+ PropertyMap vertexFormat = new PropertyMap();
+ vertexFormat.Add("aPositionQuad", new PropertyValue((int)PropertyType.Vector2));
+ PropertyBuffer quadVertices2 = new PropertyBuffer(vertexFormat);
+ unsafe
+ {
+ float* pc = (float*)Marshal.UnsafeAddrOfPinnedArrayElement(quadArray, 0);
+ IntPtr pA = new IntPtr(pc);
+ quadVertices2.SetData(pA, vertexCount);
+ }
+ //int length2 = Marshal.SizeOf(quadBuffer[0]);
+ //IntPtr p2 = Marshal.AllocHGlobal(length2 * vertexCount);
+ //quadVertices2.SetData(p2, vertexCount);
+
+ // Create the geometry object itself
+ geometry.AddVertexBuffer(circleVertices);
+ geometry.AddVertexBuffer(quadVertices2);
+ geometry.SetType(Geometry.Type.TRIANGLE_FAN);
+ }
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class ContactCard
+ {
+ private TapGestureDetector mTapDetector;
+ private View mContactCard;
+ private View mHeader;
+ private View mClippedImage;
+ private View mMaskedImage;
+ private TextLabel mNameText;
+ private TextLabel mDetailText;
+
+ private Animation mAnimation;
+ private ContactCardLayoutInfo mContactCardLayoutInfo;
+ private Vector2 foldedPosition;
+ private int mClippedImagePropertyIndex;
+ private bool mFolded;
+
+
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_X = new TimePeriod(0, 360); ///< Start at 0ms, duration 360ms
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_Y = new TimePeriod(40, 360); ///< Start at 40ms, duration 360ms
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_WIDTH = new TimePeriod(0, 360); ///< Start at 0ms, duration 360ms
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_HEIGHT = new TimePeriod(40, 360); ///< Start at 40ms, duration 360ms
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_NAME_OPACITY = new TimePeriod(0, 80); ///< Start at 0ms, duration 80ms
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_DETAIL_OPACITY = new TimePeriod( 80, 80 ); ///< Start at 80ms, duration 80ms
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_SIBLING_OPACITY = new TimePeriod( 0, 80 ); ///< Start at 0ms, duration 80ms
+ private readonly TimePeriod TIME_PERIOD_UNFOLD_MESH_MORPH = new TimePeriod( 0, 400 ); ///< Start at 0ms, duration 400ms
+
+ private readonly TimePeriod TIME_PERIOD_FOLD_X = new TimePeriod( 64, 336 ); ///< Start at 64ms, duration 336ms
+ private readonly TimePeriod TIME_PERIOD_FOLD_Y = new TimePeriod( 0, 336 ); ///< Start at 0ms, duration 336ms
+ private readonly TimePeriod TIME_PERIOD_FOLD_WIDTH = new TimePeriod( 64, 336 ); ///< Start at 64ms, duration 336ms
+ private readonly TimePeriod TIME_PERIOD_FOLD_HEIGHT = new TimePeriod( 0, 336 ); ///< Start at 0ms, duration 336ms
+ private readonly TimePeriod TIME_PERIOD_FOLD_NAME_OPACITY = new TimePeriod( 80, 80 ); ///< Start at 80ms, duration 80ms
+ private readonly TimePeriod TIME_PERIOD_FOLD_DETAIL_OPACITY = new TimePeriod( 0, 80 ); ///< Start at 0ms, duration 80ms
+ private readonly TimePeriod TIME_PERIOD_FOLD_SIBLING_OPACITY = new TimePeriod( 320, 80 ); ///< Start at 320ms, duration 80ms
+ private readonly TimePeriod TIME_PERIOD_FOLD_MESH_MORPH = new TimePeriod( 0, 400 ); ///< Start at 0ms, duration 400ms
+
+ private AlphaFunction.BuiltinFunctions ALPHA_FUNCTION_UNFOLD = AlphaFunction.BuiltinFunctions.Default;
+ private AlphaFunction.BuiltinFunctions ALPHA_FUNCTION_FOLD = AlphaFunction.BuiltinFunctions.EaseInOut;
+
+ private readonly Color HEADER_COLOR = new Color( 231.0f / 255.0f, 231.0f / 255.0f, 231.0f / 255.0f, 1.0f );
+
+
+ public ContactCard(ContactCardLayoutInfo contactCardLayoutInfo, string contactName, string contactAddress, string imagePath, Vector2 position, View rootView)
+ {
+ mContactCardLayoutInfo = contactCardLayoutInfo;
+ foldedPosition = new Vector2(position.X, position.Y);
+ mClippedImagePropertyIndex = -1;
+ mFolded = true;
+
+ //Window.Instance.KeyEvent += OnKeyEvent;
+
+ // Create a View which will be used for the background and to clip the contents
+ mContactCard = new View();
+ mContactCard.BackgroundColor = Color.White;
+ mContactCard.ClippingMode = ClippingModeType.ClipChildren;
+ mContactCard.ParentOrigin = ParentOrigin.TopLeft;
+ mContactCard.PivotPoint = PivotPoint.TopLeft;
+ mContactCard.PositionUsesPivotPoint = true;
+ mContactCard.Position2D = new Position2D((int)foldedPosition.X, (int)foldedPosition.Y);
+ mContactCard.Size2D = new Size2D((int)mContactCardLayoutInfo.foldedSize.Width, (int)mContactCardLayoutInfo.foldedSize.Height);
+ mContactCard.KeyEvent += OnKeyEvent;
+
+ Window.Instance.GetDefaultLayer().Add(mContactCard);
+ rootView.Add(mContactCard);
+
+ // Create the header which will be shown only when the contact is unfolded
+ mHeader = new View();
+ mHeader.Size2D = new Size2D((int)mContactCardLayoutInfo.headerSize.Width, (int)mContactCardLayoutInfo.headerSize.Height);
+ mHeader.BackgroundColor = HEADER_COLOR;
+ mHeader.ParentOrigin = ParentOrigin.TopLeft;
+ mHeader.PivotPoint = PivotPoint.TopLeft;
+ mHeader.PositionUsesPivotPoint = true;
+ mHeader.Position2D = new Position2D((int)mContactCardLayoutInfo.headerFoldedPosition.X, (int)mContactCardLayoutInfo.headerFoldedPosition.Y);
+
+ // Create a clipped image (whose clipping can be animated)
+ mClippedImage = ClippedImage.Create(imagePath);
+ mClippedImage.Size2D = new Size2D((int)mContactCardLayoutInfo.imageSize.Width, (int)mContactCardLayoutInfo.imageSize.Height);
+ mClippedImage.ParentOrigin = ParentOrigin.TopLeft;
+ mClippedImage.PivotPoint = PivotPoint.TopLeft;
+ mClippedImage.PositionUsesPivotPoint = true;
+ mClippedImage.Position2D = new Position2D((int)mContactCardLayoutInfo.imageFoldedPosition.X, (int)mContactCardLayoutInfo.imageFoldedPosition.Y);
+ mClippedImage.Hide();
+ mContactCard.Add(mClippedImage);
+
+ // Create an image with a mask which is to be used when the contact is folded
+ mMaskedImage = MaskedImage.Create(imagePath);
+ mMaskedImage.Size2D = new Size2D((int)mContactCardLayoutInfo.imageSize.Width, (int)mContactCardLayoutInfo.imageSize.Height);
+ mMaskedImage.ParentOrigin = ParentOrigin.TopLeft;
+ mMaskedImage.PivotPoint = PivotPoint.TopLeft;
+ mMaskedImage.PositionUsesPivotPoint = true;
+ mMaskedImage.Position2D = new Position2D((int)mContactCardLayoutInfo.imageFoldedPosition.X, (int)mContactCardLayoutInfo.imageFoldedPosition.Y);
+ mContactCard.Add(mMaskedImage);
+
+ // Add the text label for just the name
+ mNameText = new TextLabel(contactName);
+ //mNameText.StyleName = "ContactNameTextLabel";
+ mNameText.TextColor = new Color(0, 0, 0, 1);
+ mNameText.HorizontalAlignment = HorizontalAlignment.Center;
+ mNameText.PointSize = 14;
+ mNameText.ParentOrigin = ParentOrigin.TopLeft;
+ mNameText.PivotPoint = PivotPoint.TopLeft;
+ mNameText.PositionUsesPivotPoint = true;
+ mNameText.WidthResizePolicy = ResizePolicyType.FillToParent;
+ mNameText.Position2D = new Position2D((int)mContactCardLayoutInfo.textFoldedPosition.X, (int)mContactCardLayoutInfo.textFoldedPosition.Y);
+ mContactCard.Add(mNameText);
+
+ // Create the detail text-label
+ string detailString = contactName;
+ detailString += "\n\n";
+ detailString += contactAddress;
+
+ mDetailText = new TextLabel(detailString);
+ //mDetailText.StyleName = "ContactDetailTextLabel";
+ mDetailText.TextColor = new Color(0, 0, 0, 1);
+ mDetailText.MultiLine = true;
+ mDetailText.PointSize = 20;
+ mDetailText.ParentOrigin = ParentOrigin.TopLeft;
+ mDetailText.PivotPoint = PivotPoint.TopLeft;
+ mDetailText.PositionUsesPivotPoint = true;
+ mDetailText.Position2D = new Position2D((int)mContactCardLayoutInfo.textFoldedPosition.X, (int)mContactCardLayoutInfo.textFoldedPosition.Y);
+ mDetailText.Size2D = new Size2D((int)(mContactCardLayoutInfo.unfoldedSize.Width - mContactCardLayoutInfo.textFoldedPosition.X * 2.0f), 0);
+ mDetailText.Opacity = 0.0f;
+
+ // Attach tap detection to the overall clip control
+ mTapDetector = new TapGestureDetector();
+ mTapDetector.Attach(mContactCard);
+ mTapDetector.Detected += OnTap;
+ }
+
+ private void Animate()
+ {
+ FocusManager focusManager = FocusManager.Instance;
+ mAnimation = new Animation(0);
+
+ if(mFolded)
+ {
+ mContactCard.Focusable = true;
+ focusManager.SetCurrentFocusView(mContactCard);
+
+ mContactCard.Add(mHeader);
+ mContactCard.Add(mDetailText);
+
+ // Show clipped-image to animate geometry and hide the masked-image
+ mClippedImage.Show();
+ mMaskedImage.Hide();
+
+ // Animate the size of the control (and clipping area)
+ mAnimation.AnimateTo(mContactCard, "PositionX", mContactCardLayoutInfo.unfoldedPosition.X, TIME_PERIOD_UNFOLD_X.start, TIME_PERIOD_UNFOLD_X.start + TIME_PERIOD_UNFOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mContactCard, "PositionY", mContactCardLayoutInfo.unfoldedPosition.Y, TIME_PERIOD_UNFOLD_Y.start, TIME_PERIOD_UNFOLD_Y.start + TIME_PERIOD_UNFOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mContactCard, "SizeWidth", mContactCardLayoutInfo.unfoldedSize.Width, TIME_PERIOD_UNFOLD_WIDTH.start, TIME_PERIOD_UNFOLD_WIDTH.start + TIME_PERIOD_UNFOLD_WIDTH.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mContactCard, "SizeHeight", mContactCardLayoutInfo.unfoldedSize.Height, TIME_PERIOD_UNFOLD_HEIGHT.start, TIME_PERIOD_UNFOLD_HEIGHT.start + TIME_PERIOD_UNFOLD_HEIGHT.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+
+ // Animate the header area into position
+ mAnimation.AnimateTo(mHeader, "PositionX", mContactCardLayoutInfo.headerUnfoldedPosition.X, TIME_PERIOD_UNFOLD_X.start, TIME_PERIOD_UNFOLD_X.start + TIME_PERIOD_UNFOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mHeader, "PositionY", mContactCardLayoutInfo.headerUnfoldedPosition.Y, TIME_PERIOD_UNFOLD_Y.start, TIME_PERIOD_UNFOLD_Y.start + TIME_PERIOD_UNFOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+
+ // Animate the clipped image into the unfolded position and into a quad
+ mAnimation.AnimateTo(mClippedImage, "PositionX", mContactCardLayoutInfo.imageUnfoldedPosition.X, TIME_PERIOD_UNFOLD_X.start, TIME_PERIOD_UNFOLD_X.start + TIME_PERIOD_UNFOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mClippedImage, "PositionY", mContactCardLayoutInfo.imageUnfoldedPosition.Y, TIME_PERIOD_UNFOLD_Y.start, TIME_PERIOD_UNFOLD_Y.start + TIME_PERIOD_UNFOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mClippedImage, "uDelta", ClippedImage.QUAD_GEOMETRY, TIME_PERIOD_UNFOLD_MESH_MORPH.start , TIME_PERIOD_UNFOLD_MESH_MORPH.start + TIME_PERIOD_UNFOLD_MESH_MORPH.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+
+ // Fade out the opacity of the name, and animate into the unfolded position
+ mAnimation.AnimateTo(mNameText, "ColorAlpha", 0.0f, TIME_PERIOD_UNFOLD_NAME_OPACITY.start, TIME_PERIOD_UNFOLD_NAME_OPACITY.start + TIME_PERIOD_UNFOLD_NAME_OPACITY.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mNameText, "PositionX", mContactCardLayoutInfo.textUnfoldedPosition.X, TIME_PERIOD_UNFOLD_X.start, TIME_PERIOD_UNFOLD_X.start + TIME_PERIOD_UNFOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mNameText, "PositionY", mContactCardLayoutInfo.textUnfoldedPosition.Y, TIME_PERIOD_UNFOLD_Y.start, TIME_PERIOD_UNFOLD_Y.start + TIME_PERIOD_UNFOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+
+ // Fade in the opacity of the detail, and animate into the unfolded position
+ mAnimation.AnimateTo(mDetailText, "ColorAlpha", 1.0f, TIME_PERIOD_UNFOLD_NAME_OPACITY.start, TIME_PERIOD_UNFOLD_NAME_OPACITY.start + TIME_PERIOD_UNFOLD_NAME_OPACITY.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mDetailText, "PositionX", mContactCardLayoutInfo.textUnfoldedPosition.X, TIME_PERIOD_UNFOLD_X.start, TIME_PERIOD_UNFOLD_X.start + TIME_PERIOD_UNFOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ mAnimation.AnimateTo(mDetailText, "PositionY", mContactCardLayoutInfo.textUnfoldedPosition.Y, TIME_PERIOD_UNFOLD_Y.start, TIME_PERIOD_UNFOLD_Y.start + TIME_PERIOD_UNFOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+
+ // Fade out all the siblings
+ View parent = mContactCard.GetParent() as View;
+ for (uint i = 0; i < parent.GetChildCount(); ++i)
+ {
+ View sibling = parent.GetChildAt(i);
+ if (sibling != mContactCard)
+ {
+ mAnimation.AnimateTo(sibling, "ColorAlpha", 0.0f, TIME_PERIOD_UNFOLD_SIBLING_OPACITY.start, TIME_PERIOD_UNFOLD_SIBLING_OPACITY.start + TIME_PERIOD_UNFOLD_SIBLING_OPACITY.duration, new AlphaFunction(ALPHA_FUNCTION_UNFOLD));
+ sibling.Sensitive = false;
+ }
+ }
+
+ mAnimation.Finished += OnAnimationFinished;
+ mAnimation.Play();
+ }
+ else
+ {
+ // Remove key-input-focus from our contact-card when we are folded
+ FocusManager.Instance.ClearFocus();
+
+ mContactCard.Add(mNameText);
+
+ // Animate the size of the control (and clipping area)
+ mAnimation.AnimateTo(mContactCard, "PositionX", foldedPosition.X, TIME_PERIOD_FOLD_X.start, TIME_PERIOD_FOLD_X.start + TIME_PERIOD_FOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mContactCard, "PositionY", foldedPosition.Y, TIME_PERIOD_FOLD_Y.start, TIME_PERIOD_FOLD_Y.start + TIME_PERIOD_FOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mContactCard, "SizeWidth", mContactCardLayoutInfo.foldedSize.Width, TIME_PERIOD_FOLD_WIDTH.start, TIME_PERIOD_FOLD_WIDTH.start + TIME_PERIOD_FOLD_WIDTH.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mContactCard, "SizeHeight", mContactCardLayoutInfo.foldedSize.Height, TIME_PERIOD_FOLD_HEIGHT.start, TIME_PERIOD_FOLD_HEIGHT.start + TIME_PERIOD_FOLD_HEIGHT.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+
+ // Animate the header area out of position
+ mAnimation.AnimateTo(mHeader, "PositionX", mContactCardLayoutInfo.headerFoldedPosition.X, TIME_PERIOD_FOLD_X.start, TIME_PERIOD_FOLD_X.start + TIME_PERIOD_FOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mHeader, "PositionY", mContactCardLayoutInfo.headerFoldedPosition.Y, TIME_PERIOD_FOLD_Y.start, TIME_PERIOD_FOLD_Y.start + TIME_PERIOD_FOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+
+ // Animate the clipped image into the folded position and into a circle
+ mAnimation.AnimateTo(mClippedImage, "PositionX", mContactCardLayoutInfo.imageFoldedPosition.X, TIME_PERIOD_FOLD_X.start, TIME_PERIOD_FOLD_X.start + TIME_PERIOD_FOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mClippedImage, "PositionY", mContactCardLayoutInfo.imageFoldedPosition.Y, TIME_PERIOD_FOLD_Y.start, TIME_PERIOD_FOLD_Y.start + TIME_PERIOD_FOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mClippedImage, "uDelta", 0.0f, TIME_PERIOD_FOLD_MESH_MORPH.start, TIME_PERIOD_FOLD_MESH_MORPH.start + TIME_PERIOD_FOLD_MESH_MORPH.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+
+ // Fade in the opacity of the name, and animate into the folded position
+ mAnimation.AnimateTo(mNameText, "ColorAlpha", 1.0f, TIME_PERIOD_FOLD_NAME_OPACITY.start, TIME_PERIOD_FOLD_NAME_OPACITY.start + TIME_PERIOD_FOLD_NAME_OPACITY.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mNameText, "PositionX", mContactCardLayoutInfo.textFoldedPosition.X, TIME_PERIOD_FOLD_X.start, TIME_PERIOD_FOLD_X.start + TIME_PERIOD_FOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mNameText, "PositionY", mContactCardLayoutInfo.textFoldedPosition.Y, TIME_PERIOD_FOLD_Y.start, TIME_PERIOD_FOLD_Y.start + TIME_PERIOD_FOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+
+ // Fade out the opacity of the detail, and animate into the folded position
+ mAnimation.AnimateTo(mDetailText, "ColorAlpha", 0.0f, TIME_PERIOD_FOLD_DETAIL_OPACITY.start, TIME_PERIOD_FOLD_DETAIL_OPACITY.start + TIME_PERIOD_FOLD_DETAIL_OPACITY.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mDetailText, "PositionX", mContactCardLayoutInfo.textFoldedPosition.X, TIME_PERIOD_FOLD_X.start, TIME_PERIOD_FOLD_X.start + TIME_PERIOD_FOLD_X.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ mAnimation.AnimateTo(mDetailText, "PositionY", mContactCardLayoutInfo.textFoldedPosition.Y, TIME_PERIOD_FOLD_Y.start, TIME_PERIOD_FOLD_Y.start + TIME_PERIOD_FOLD_Y.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+
+ // Slowly fade in all the siblings
+ View parent = mContactCard.GetParent() as View;
+ for (uint i = 0; i < parent.GetChildCount(); ++i)
+ {
+ View sibling = parent.GetChildAt(i);
+ if (sibling != mContactCard)
+ {
+ mAnimation.AnimateTo(sibling, "ColorAlpha", 1.0f, TIME_PERIOD_FOLD_SIBLING_OPACITY.start, TIME_PERIOD_FOLD_SIBLING_OPACITY.start + TIME_PERIOD_FOLD_SIBLING_OPACITY.duration, new AlphaFunction(ALPHA_FUNCTION_FOLD));
+ sibling.Sensitive = true;
+ }
+ }
+
+ mAnimation.Finished += OnAnimationFinished;
+ mAnimation.Play();
+ }
+
+ mFolded = !mFolded;
+ }
+
+ private void OnAnimationFinished(object sender, EventArgs e)
+ {
+ Animation animation = sender as Animation;
+
+ // Ensure the finishing animation is the latest as we do not want to change state if a previous animation has finished
+ if (mAnimation == animation)
+ {
+ if(mFolded)
+ {
+ mHeader.Unparent();
+ mDetailText.Unparent();
+
+ // Hide the clipped-image as we have finished animating the geometry and show the masked-image again
+ mClippedImage.Hide();
+ mMaskedImage.Show();
+ }
+ }
+ }
+
+ private bool OnKeyEvent(object sender, View.KeyEventArgs e)
+ {
+ if((!mFolded) && (e.Key.State == Key.StateType.Down))
+ {
+ if(e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "BackSpace")
+ {
+ FocusManager focusManager = FocusManager.Instance;
+ if(focusManager.GetCurrentFocusView() == mContactCard)
+ {
+ // Our contact - card is set to receive focus and we're unfolded so animate back to the folded state
+ Animate();
+ }
+ }
+ }
+
+ return true;
+ }
+
+ private void OnTap(object sender, TapGestureDetector.DetectedEventArgs e)
+ {
+ View view = sender as View;
+ if(view = mContactCard)
+ {
+ Animate();
+ }
+ }
+
+ public class TimePeriod
+ {
+ public int start;
+ public int duration;
+
+ public TimePeriod(int _start, int _duration)
+ {
+ start = _start;
+ duration = _duration;
+ }
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Samples
+{
+ public class ContactCardLayoutInfo
+ {
+ public Vector2 unfoldedPosition = new Vector2(0, 0);
+ public Vector2 unfoldedSize = new Vector2(0, 0);
+ public Vector2 foldedSize = new Vector2(0, 0);
+
+ public Vector2 padding = new Vector2(0, 0);
+
+ public Vector2 headerSize = new Vector2(0, 0);
+ public Vector2 headerFoldedPosition = new Vector2(0, 0);
+ public Vector2 headerUnfoldedPosition = new Vector2(0, 0);
+
+ public Vector2 imageSize = new Vector2(0, 0);
+ public Vector2 imageFoldedPosition = new Vector2(0, 0);
+ public Vector2 imageUnfoldedPosition = new Vector2(0, 0);
+
+ public Vector2 textFoldedPosition = new Vector2(0, 0);
+ public Vector2 textUnfoldedPosition = new Vector2(0, 0);
+
+
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class ContactCardLayouter
+ {
+ private const float DEFAULT_PADDING = 25.0f;
+
+ private const float MINIMUM_ITEMS_PER_ROW_OR_COLUMN = 3.0f;
+
+ private const float HEADER_HEIGHT_TO_UNFOLDED_SIZE_RATIO = 0.1f;
+ private readonly Vector2 HEADER_FOLDED_POSITION_AS_RATIO_OF_SIZE = new Vector2(-0.05f, -1.5f);
+ private readonly Vector2 HEADER_UNFOLDED_POSITION = new Vector2(0.0f, 0.0f);
+
+ const float IMAGE_SIZE_AS_RATIO_TO_FOLDED_SIZE = 0.5f;
+ private readonly Vector2 IMAGE_FOLDED_POSITION_AS_RATIO_OF_SIZE = new Vector2(0.5f, 0.25f);
+
+ const float FOLDED_TEXT_POSITION_AS_RATIO_OF_IMAGE_SIZE = 1.01f;
+
+ private readonly Vector4 ROOTVIEW_COLOR = new Vector4(211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f);
+
+
+ private ContactCardLayoutInfo mContactCardLayoutInfo;
+ private List<ContactCard> mContactCards;
+
+ private Vector2 mLastPosition;
+ private Vector2 mPositionIncrementer;
+ private int mItemsPerRow;
+
+ private bool mInitialized;
+
+ private View rootView;
+
+ public ContactCardLayouter()
+ {
+ Initialize();
+ }
+
+ private void Initialize()
+ {
+ mContactCardLayoutInfo = new ContactCardLayoutInfo();
+ mContactCards = new List<ContactCard>();
+ mLastPosition = new Vector2();
+ mPositionIncrementer = new Vector2();
+ mItemsPerRow = 0;
+ mInitialized = false;
+
+ rootView = new View()
+ {
+ Size2D = new Size2D(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height),
+ BackgroundColor = ROOTVIEW_COLOR,
+ PositionUsesPivotPoint = false,
+ };
+
+ Window.Instance.Add(rootView);
+
+ }
+
+ public void AddContact(string contactName, string contactAddress, string imagePath)
+ {
+ if(!mInitialized)
+ {
+ // Set up the common layouting info shared between all contact cards when first called
+ mContactCardLayoutInfo.unfoldedPosition = mContactCardLayoutInfo.padding = new Vector2(DEFAULT_PADDING, DEFAULT_PADDING);
+ Vector2 windowSize = new Vector2(Window.Instance.Size.Width, Window.Instance.Size.Height);
+ mContactCardLayoutInfo.unfoldedSize = windowSize - mContactCardLayoutInfo.padding * (MINIMUM_ITEMS_PER_ROW_OR_COLUMN - 1.0f);
+
+ // Calculate the size of the folded card (use the minimum of width/height as size)
+ mContactCardLayoutInfo.foldedSize = (mContactCardLayoutInfo.unfoldedSize - (mContactCardLayoutInfo.padding * (MINIMUM_ITEMS_PER_ROW_OR_COLUMN - 1.0f))) / MINIMUM_ITEMS_PER_ROW_OR_COLUMN;
+ mContactCardLayoutInfo.foldedSize.Width = mContactCardLayoutInfo.foldedSize.Height = Math.Min(mContactCardLayoutInfo.foldedSize.Width, mContactCardLayoutInfo.foldedSize.Height);
+
+ // Set the size and positions of the header
+ mContactCardLayoutInfo.headerSize.Width = mContactCardLayoutInfo.unfoldedSize.Width;
+ mContactCardLayoutInfo.headerSize.Height = mContactCardLayoutInfo.unfoldedSize.Height * HEADER_HEIGHT_TO_UNFOLDED_SIZE_RATIO;
+ mContactCardLayoutInfo.headerFoldedPosition = mContactCardLayoutInfo.headerSize * HEADER_FOLDED_POSITION_AS_RATIO_OF_SIZE;
+ mContactCardLayoutInfo.headerUnfoldedPosition = HEADER_UNFOLDED_POSITION;
+
+ // Set the image size and positions
+ mContactCardLayoutInfo.imageSize = mContactCardLayoutInfo.foldedSize * IMAGE_SIZE_AS_RATIO_TO_FOLDED_SIZE;
+ mContactCardLayoutInfo.imageFoldedPosition = mContactCardLayoutInfo.imageSize * IMAGE_FOLDED_POSITION_AS_RATIO_OF_SIZE;
+ mContactCardLayoutInfo.imageUnfoldedPosition.X = mContactCardLayoutInfo.padding.Width;
+ mContactCardLayoutInfo.imageUnfoldedPosition.Y = mContactCardLayoutInfo.headerSize.Height + mContactCardLayoutInfo.padding.Height;
+
+ // Set the positions of the contact name
+ mContactCardLayoutInfo.textFoldedPosition.X = 0.0f;
+ mContactCardLayoutInfo.textFoldedPosition.Y = mContactCardLayoutInfo.imageFoldedPosition.X + mContactCardLayoutInfo.imageSize.Height * FOLDED_TEXT_POSITION_AS_RATIO_OF_IMAGE_SIZE;
+ mContactCardLayoutInfo.textUnfoldedPosition.X = mContactCardLayoutInfo.padding.Width;
+ mContactCardLayoutInfo.textUnfoldedPosition.Y = mContactCardLayoutInfo.imageUnfoldedPosition.Y + mContactCardLayoutInfo.imageSize.Height + mContactCardLayoutInfo.padding.Height;
+
+ // Figure out the positions of the contact cards
+ mItemsPerRow = (int)((mContactCardLayoutInfo.unfoldedSize.Width + mContactCardLayoutInfo.padding.Width) / (mContactCardLayoutInfo.foldedSize.Width + mContactCardLayoutInfo.padding.Width));
+ mLastPosition = new Vector2(mContactCardLayoutInfo.unfoldedPosition.X, mContactCardLayoutInfo.unfoldedPosition.Y);
+ mPositionIncrementer.X = mContactCardLayoutInfo.foldedSize.Width + mContactCardLayoutInfo.padding.Width;
+ mPositionIncrementer.Y = mContactCardLayoutInfo.foldedSize.Height + mContactCardLayoutInfo.padding.Height;
+
+ mInitialized = true;
+ }
+
+ mContactCards.Add(new ContactCard(mContactCardLayoutInfo, contactName, contactAddress, imagePath, NextCardPosition(), rootView));
+
+ }
+
+ private Vector2 NextCardPosition()
+ {
+ int currentNumOfCards = mContactCards.Count();
+
+ if(currentNumOfCards > 0)
+ {
+ if(currentNumOfCards % mItemsPerRow != 0)
+ {
+ mLastPosition.X += mPositionIncrementer.X;
+ }
+ else
+ {
+ mLastPosition.X = mContactCardLayoutInfo.unfoldedPosition.X;
+ mLastPosition.Y += mPositionIncrementer.Y;
+ }
+ }
+
+ return mLastPosition;
+ }
+
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Samples
+{
+ public class ContactCardsSample : IExample
+ {
+ private readonly Vector4 WINDOW_COLOR = new Vector4( 211.0f / 255.0f, 211.0f / 255.0f, 211.0f / 255.0f, 1.0f );
+ private ContactCardLayouter mContactCardLayouter;
+
+ //protected override void OnCreate()
+ //{
+ // base.OnCreate();
+ // Activate();
+ //}
+
+ public void Activate()
+ {
+ Window.Instance.BackgroundColor = WINDOW_COLOR;
+ //Window.Instance.KeyEvent += OnKeyEvent;
+
+ mContactCardLayouter = new ContactCardLayouter();
+
+ for (int i = 0; i < ContactData.itemSize; i++)
+ {
+ mContactCardLayouter.AddContact(ContactData.itmes[i].name, ContactData.itmes[i].address, ContactData.itmes[i].imagePath);
+ }
+ }
+
+ public void Deactivate()
+ {
+
+ }
+
+ //private void OnKeyEvent(object sender, Window.KeyEventArgs e)
+ //{
+ // if(e.Key.State == Key.StateType.Down)
+ // {
+ // FocusManager focusManager = FocusManager.Instance;
+ // if(!focusManager.GetCurrentFocusView())
+ // {
+ // if (e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "BackSpace")
+ // {
+
+ // }
+ // }
+ // }
+ //}
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Samples
+{
+ public class ContactData
+ {
+ public const int itemSize = 15;
+ public static readonly string floder = CommonResource.GetFHResourcePath() + "ContactCard/";
+ public class Item
+ {
+ public string name;
+ public string address;
+ public string imagePath;
+
+ public Item(string _name, string _address, string _imagePath)
+ {
+ name = _name;
+ address = _address;
+ imagePath = _imagePath;
+ }
+ }
+
+ public static Item[] itmes = new Item[itemSize]
+ {
+ new Item("Shelia Ramos", "19 Wormley Ct\nWinters Way\nWaltham Abbey\nEN9 3HW", floder +"gallery-small-19.jpg"),
+ new Item("Walter Jensen", "32 Upper Fant Rd\nMaidstone\nME16 8DN", floder + "gallery-small-2.jpg"),
+ new Item("Randal Parks", "8 Rymill St\nLondon\nE16 2JF", floder + "gallery-small-3.jpg"),
+ new Item("Tasha Cooper", "2 Kyles View\nColintraive\nPA22 3AS", floder + "gallery-small-4.jpg"),
+ new Item("Domingo Lynch", "Red Lion Farm\nWatlington\nOX49 5LG", floder + "gallery-small-5.jpg"),
+ new Item("Dan Haynes", "239 Whitefield Dr\nLiverpool\nL32 0RD", floder + "gallery-small-6.jpg"),
+ new Item("Leslie Wong", "1 Tullyvar Rd\nAughnacloy\nBT69 6BQ", floder + "gallery-small-7.jpg"),
+ new Item("Mable Hodges", "5 Mortimer Rd\nGrazeley\nReading\nRG7 1LA", floder + "gallery-small-8.jpg"),
+ new Item("Kristi Riley", "10 Jura Dr\nOld Kilpatrick\nGlasgow\nG60 5EH", floder + "gallery-small-17.jpg"),
+ new Item("Terry Clark", "142 Raeberry St\nGlasgow\nG20 6EA", floder + "gallery-small-18.jpg"),
+ new Item("Horace Bailey", "11 Assembly St\nNormanton\nWF6 2DB", floder + "gallery-small-11.jpg"),
+ new Item("Suzanne Delgado", "6 Grange Rd\nDownpatrick\nBT30 7DB", floder + "gallery-small-12.jpg"),
+ new Item("Jamie Bennett", "117 Potter St\nNorthwood\nHA6 1QF", floder + "gallery-small-13.jpg"),
+ new Item("Emmett Yates", "18 Renfrew Way\nBletchley\nMilton Keynes\nMK3 7NY", floder + "gallery-small-14.jpg"),
+ new Item("Glen Vaughn", "5 Hasman Terrace\nCove Bay\nAberdeen\nAB12 3GD", floder + "gallery-small-15.jpg")
+ };
+
+ }
+
+
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class MaskedImage
+ {
+ private static readonly string IMAGE_MASK = CommonResource.GetFHResourcePath() + "ContactCard/contact-cards-mask.png";
+
+ public static View Create(string imagePath)
+ {
+ View maskedImage = new ImageView();
+ ImageVisual imageVisual = new ImageVisual();
+ imageVisual.URL = imagePath;
+ imageVisual.AlphaMaskURL = IMAGE_MASK;
+ maskedImage.Background = imageVisual.OutputVisualMap;
+
+ return maskedImage;
+ }
+ }
+}
--- /dev/null
+
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class CubeTransitionEffectSample : IExample
+ {
+ static string DEMO_IMAGE_DIR = CommonResource.GetFHResourcePath() + "CubeTransitionEffect/";
+
+ string TOOLBAR_IMAGE = DEMO_IMAGE_DIR + "top-bar.png";
+ string APPLICATION_TITLE_WAVE = "Cube Transition: Wave";
+ string APPLICATION_TITLE_CROSS = "Cube Transition: Cross";
+ string APPLICATION_TITLE_FOLD = "Cube Transition: Fold";
+ string EFFECT_WAVE_IMAGE = DEMO_IMAGE_DIR + "icon-effect-wave.png";
+ string EFFECT_WAVE_IMAGE_SELECTED = DEMO_IMAGE_DIR + "icon-effect-wave-selected.png";
+ string EFFECT_CROSS_IMAGE = DEMO_IMAGE_DIR + "icon-effect-cross.png";
+ string EFFECT_CROSS_IMAGE_SELECTED = DEMO_IMAGE_DIR + "icon-effect-cross-selected.png";
+ string EFFECT_FOLD_IMAGE = DEMO_IMAGE_DIR + "icon-effect-fold.png";
+ string EFFECT_FOLD_IMAGE_SELECTED = DEMO_IMAGE_DIR + "icon-effect-fold-selected.png";
+ string SLIDE_SHOW_START_ICON = DEMO_IMAGE_DIR + "icon-play.png";
+ string SLIDE_SHOW_START_ICON_SELECTED = DEMO_IMAGE_DIR + "icon-play-selected.png";
+ string SLIDE_SHOW_STOP_ICON = DEMO_IMAGE_DIR + "icon-stop.png";
+ string SLIDE_SHOW_STOP_ICON_SELECTED = DEMO_IMAGE_DIR + "icon-stop-selected.png";
+
+ string[] IMAGES = new string[] {
+ DEMO_IMAGE_DIR + "gallery-large-1.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-2.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-3.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-4.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-5.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-6.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-7.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-8.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-9.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-10.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-11.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-12.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-13.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-14.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-15.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-16.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-17.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-18.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-19.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-20.jpg",
+ DEMO_IMAGE_DIR + "gallery-large-21.jpg",
+ };
+
+ const int NUM_IMAGES = 21;
+
+ // the number of cubes: NUM_COLUMNS*NUM_ROWS
+ // better choose the numbers that can divide viewAreaSize.x
+ const int NUM_COLUMNS_WAVE = 16;
+ const int NUM_COLUMNS_CROSS = 8;
+ const int NUM_COLUMNS_FOLD = 8;
+ // better choose the numbers that can divide viewAreaSize.y
+ const int NUM_ROWS_WAVE = 20;
+ const int NUM_ROWS_CROSS = 10;
+ const int NUM_ROWS_FOLD = 10;
+ //transition effect duration
+ const float ANIMATION_DURATION_WAVE = 1.5f;
+ const float ANIMATION_DURATION_CROSS = 1.0f;
+ const float ANIMATION_DURATION_FOLD = 1.0f;
+ //transition effect displacement
+ const float CUBE_DISPLACEMENT_WAVE = 70.0f;
+ const float CUBE_DISPLACEMENT_CROSS = 30.0f;
+
+ // The duration of the current image staying on screen when slideshow is on
+ const int VIEWINGTIME = 2000; // 2 seconds
+
+ private View tool_bar;
+ private TextLabel mTitle;
+ private Layer content_layer;
+ private View mContent;
+ private ToggleButton toggle_button;
+ private PushButton mSlideshowButton;
+
+ private Texture mCurrentTexture;
+ private Texture mNextTexture;
+ private uint mIndex = 0;
+ private bool mIsImageLoading = false;
+
+ private PanGestureDetector mPanGestureDetector;
+
+ private CubeTransitionEffect mCubeWaveEffect;
+ private CubeTransitionEffect mCubeCrossEffect;
+ private CubeTransitionEffect mCubeFoldEffect;
+ private CubeTransitionEffect mCurrentEffect;
+
+ private Timer mViewTimer;
+ private bool mSlideshow = false;
+
+ private Vector2 mPanPosition;
+ private Vector2 mPanDisplacement;
+
+ public void Activate()
+ {
+ // tool bar
+ tool_bar = new View();
+ tool_bar.BackgroundColor = Color.White;
+ tool_bar.Size2D = new Size2D(Window.Instance.WindowSize.Width, 100);
+ tool_bar.PositionUsesPivotPoint = true;
+ tool_bar.ParentOrigin = ParentOrigin.TopLeft;
+ tool_bar.PivotPoint = PivotPoint.TopLeft;
+
+ Window.Instance.GetDefaultLayer().Add(tool_bar);
+ Window.Instance.GetDefaultLayer().RaiseToTop();
+
+ // title of tool bar
+ mTitle = new TextLabel();
+ mTitle.Text = APPLICATION_TITLE_WAVE;
+ mTitle.FontFamily = "SamsungOne 400";
+ mTitle.PointSize = 20;
+ mTitle.Position2D = new Position2D(400, 42);
+ mTitle.ParentOrigin = ParentOrigin.TopLeft;
+ mTitle.PositionUsesPivotPoint = true;
+ mTitle.PivotPoint = PivotPoint.TopLeft;
+ tool_bar.Add(mTitle);
+
+ // push button of tool bar
+ mSlideshowButton = new PushButton();
+ PropertyMap unselected_bg_map = new PropertyMap();
+ unselected_bg_map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ unselected_bg_map.Add(ImageVisualProperty.URL, new PropertyValue(SLIDE_SHOW_START_ICON));
+ mSlideshowButton.UnselectedBackgroundVisual = unselected_bg_map;
+
+ PropertyMap selected_bg_map = new PropertyMap();
+ selected_bg_map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ selected_bg_map.Add(ImageVisualProperty.URL, new PropertyValue(SLIDE_SHOW_START_ICON_SELECTED));
+ mSlideshowButton.SelectedBackgroundVisual = selected_bg_map;
+
+ mSlideshowButton.ParentOrigin = ParentOrigin.TopLeft;
+ mSlideshowButton.PivotPoint = PivotPoint.TopLeft;
+ mSlideshowButton.Position2D = new Position2D(800, 32);
+ mSlideshowButton.Clicked += OnPushButtonClicked;
+
+ mSlideshowButton.RaiseToTop();
+
+ tool_bar.Add(mSlideshowButton);
+
+ // toggle button of tool bar
+ toggle_button = new ToggleButton();
+ PropertyArray array = new PropertyArray();
+ array.Add(new PropertyValue(EFFECT_WAVE_IMAGE));
+ array.Add(new PropertyValue(EFFECT_CROSS_IMAGE));
+ array.Add(new PropertyValue(EFFECT_FOLD_IMAGE));
+ toggle_button.StateVisuals = array;
+
+ toggle_button.ParentOrigin = ParentOrigin.TopLeft;
+ toggle_button.PivotPoint = PivotPoint.TopLeft;
+ toggle_button.CellHorizontalAlignment = HorizontalAlignmentType.Right;
+ toggle_button.Position2D = new Position2D(900, 42);
+
+ toggle_button.Clicked += OnToggleButtonClicked;
+
+ tool_bar.Add(toggle_button);
+
+ // load image
+ mCurrentTexture = LoadStageFillingTexture(IMAGES[mIndex]);
+
+ // content layer is 3D.
+ content_layer = new Layer();
+ content_layer.Behavior = Layer.LayerBehavior.Layer3D;
+ Window.Instance.AddLayer(content_layer);
+
+ //use small cubes
+ mCubeWaveEffect = new CubeTransitionWaveEffect(NUM_ROWS_WAVE, NUM_COLUMNS_WAVE);
+ mCubeWaveEffect.SetTransitionDuration(ANIMATION_DURATION_WAVE);
+ mCubeWaveEffect.SetCubeDisplacement(CUBE_DISPLACEMENT_WAVE);
+ mCubeWaveEffect.TransitionCompleted += OnCubeEffectCompleted;
+
+ mCubeWaveEffect.Position2D = new Position2D(0, tool_bar.Size2D.Height);
+ mCubeWaveEffect.Size2D = new Size2D(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height - tool_bar.Size2D.Height);
+ mCubeWaveEffect.PivotPoint = PivotPoint.TopLeft;
+ mCubeWaveEffect.ParentOrigin = ParentOrigin.TopLeft;
+ mCubeWaveEffect.SetCurrentTexture(mCurrentTexture);
+
+ // use big cubes
+ mCubeCrossEffect = new CubeTransitionCrossEffect(NUM_ROWS_CROSS, NUM_COLUMNS_CROSS);
+ mCubeCrossEffect.SetTransitionDuration(ANIMATION_DURATION_CROSS);
+ mCubeCrossEffect.SetCubeDisplacement(CUBE_DISPLACEMENT_CROSS);
+ mCubeCrossEffect.TransitionCompleted += OnCubeEffectCompleted;
+
+ mCubeCrossEffect.Position2D = new Position2D(0, tool_bar.Size2D.Height);
+ mCubeCrossEffect.Size2D = new Size2D(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height - tool_bar.Size2D.Height);
+ mCubeCrossEffect.PivotPoint = PivotPoint.TopLeft;
+ mCubeCrossEffect.ParentOrigin = ParentOrigin.TopLeft;
+ mCubeCrossEffect.SetCurrentTexture(mCurrentTexture);
+
+ mCubeFoldEffect = new CubeTransitionFoldEffect(NUM_ROWS_FOLD, NUM_COLUMNS_FOLD);
+ mCubeFoldEffect.SetTransitionDuration(ANIMATION_DURATION_FOLD);
+ mCubeFoldEffect.TransitionCompleted += OnCubeEffectCompleted;
+
+ mCubeFoldEffect.Position2D = new Position2D(0, tool_bar.Size2D.Height);
+ mCubeFoldEffect.Size2D = new Size2D(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height - tool_bar.Size2D.Height);
+ mCubeFoldEffect.PivotPoint = PivotPoint.TopLeft;
+ mCubeFoldEffect.ParentOrigin = ParentOrigin.TopLeft;
+ mCubeFoldEffect.SetCurrentTexture(mCurrentTexture);
+
+ mViewTimer = new Timer(VIEWINGTIME);
+ mViewTimer.Tick += OnTimerTick;
+
+ // content
+ mCurrentEffect = mCubeWaveEffect;
+
+ mContent = new View();
+ mContent.Size2D = new Size2D(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height - tool_bar.Size2D.Height);
+ mContent.ParentOrigin = ParentOrigin.TopLeft;
+ mContent.PositionUsesPivotPoint = true;
+ mContent.PivotPoint = PivotPoint.TopLeft;
+
+ mContent.Add(mCurrentEffect);
+
+ content_layer.Add(mContent);
+
+ mPanGestureDetector = new PanGestureDetector();
+ mPanGestureDetector.Detected += OnPanGesture;
+ mPanGestureDetector.Attach(mContent);
+ }
+
+ public void Deactivate()
+ {
+ if (mTitle)
+ {
+ tool_bar.Remove(mTitle);
+ mTitle.Dispose();
+ mTitle = null;
+ }
+
+ if (mSlideshowButton)
+ {
+ tool_bar.Remove(mSlideshowButton);
+ mSlideshowButton.Clicked -= OnPushButtonClicked;
+ mSlideshowButton.Dispose();
+ mSlideshowButton = null;
+ }
+
+ if (toggle_button)
+ {
+ tool_bar.Remove(toggle_button);
+ toggle_button.Clicked -= OnToggleButtonClicked;
+ toggle_button.Dispose();
+ toggle_button = null;
+ }
+
+ if (tool_bar)
+ {
+ Window.Instance.GetDefaultLayer().Remove(tool_bar);
+ tool_bar.Dispose();
+ tool_bar = null;
+ }
+
+ if (mCubeWaveEffect)
+ {
+ mCubeWaveEffect.TransitionCompleted -= OnCubeEffectCompleted;
+ mCubeWaveEffect.Dispose();
+ mCubeWaveEffect = null;
+ }
+
+ if (mCubeCrossEffect)
+ {
+ mCubeCrossEffect.TransitionCompleted -= OnCubeEffectCompleted;
+ mCubeCrossEffect.Dispose();
+ mCubeCrossEffect = null;
+ }
+
+ if (mCubeFoldEffect)
+ {
+ mCubeFoldEffect.TransitionCompleted -= OnCubeEffectCompleted;
+ mCubeFoldEffect.Dispose();
+ mCubeFoldEffect = null;
+ }
+
+ if (mPanGestureDetector)
+ {
+ mPanGestureDetector.Detected -= OnPanGesture;
+ mPanGestureDetector.Dispose();
+ mPanGestureDetector = null;
+ }
+
+ if (null != mViewTimer)
+ {
+ mViewTimer.Stop();
+ mViewTimer.Tick -= OnTimerTick;
+ mViewTimer.Dispose();
+ mViewTimer = null;
+ }
+
+ if (null != mCurrentEffect)
+ {
+ mCurrentEffect.StopTransition();
+ mContent.Remove(mCurrentEffect);
+ mCurrentEffect.Dispose();
+ mCurrentEffect = null;
+ }
+
+ if (mContent)
+ {
+ content_layer.Remove(mContent);
+ mContent.Dispose();
+ mContent = null;
+ }
+
+ if (content_layer)
+ {
+ Window.Instance.RemoveLayer(content_layer);
+ content_layer.Dispose();
+ content_layer = null;
+ }
+ }
+
+ private void OnPanGesture(object sender, PanGestureDetector.DetectedEventArgs gesture)
+ {
+ // does not response when the transition has not finished
+ if (mIsImageLoading || mCubeWaveEffect.IsTransitioning() || mCubeCrossEffect.IsTransitioning() || mCubeFoldEffect.IsTransitioning() || mSlideshow)
+ {
+ return;
+ }
+
+ if (gesture.PanGesture.State == Gesture.StateType.Continuing)
+ {
+ if (gesture.PanGesture.Displacement.X < 0)
+ {
+ mIndex = (mIndex + 1) % NUM_IMAGES;
+ }
+ else
+ {
+ mIndex = (mIndex + NUM_IMAGES - 1) % NUM_IMAGES;
+ }
+
+ mPanPosition = gesture.PanGesture.Position;
+ mPanDisplacement = gesture.PanGesture.Displacement;
+ GoToNextImage();
+ }
+ }
+
+ private void GoToNextImage()
+ {
+ mNextTexture = LoadStageFillingTexture(IMAGES[mIndex]);
+
+ mCurrentEffect.SetTargetTexture(mNextTexture);
+ mIsImageLoading = false;
+
+ mCurrentEffect.StartTransition(mPanPosition, mPanDisplacement);
+
+ mCurrentTexture = mNextTexture;
+ }
+
+
+ private bool OnTimerTick(object sender, Timer.TickEventArgs args)
+ {
+ if (mSlideshow)
+ {
+ mIndex = (mIndex + 1) % NUM_IMAGES;
+ GoToNextImage();
+ }
+
+ return false;
+ }
+
+ private void OnCubeEffectCompleted(object sender, CubeTransitionEffect.TransitionCompletedEventArgs args)
+ {
+ if (mSlideshow)
+ {
+ mViewTimer.Start();
+ }
+ }
+
+ private Texture LoadStageFillingTexture(string filepath)
+ {
+ Size2D dimensions = new Size2D(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Height);
+ PixelBuffer pb = ImageLoading.LoadImageFromFile(filepath, dimensions, FittingModeType.ScaleToFill);
+ PixelData pd = PixelBuffer.Convert(pb);
+
+ Texture texture = new Texture(TextureType.TEXTURE_2D, pd.GetPixelFormat(), pd.GetWidth(), pd.GetHeight());
+ texture.Upload(pd);
+
+ return texture;
+ }
+
+ private bool OnToggleButtonClicked(object sender, global::System.EventArgs args)
+ {
+ mContent.Remove(mCurrentEffect);
+ if (mCurrentEffect == mCubeWaveEffect)
+ {
+ mCurrentEffect = mCubeCrossEffect;
+ mTitle.Text = APPLICATION_TITLE_CROSS;
+ }
+ else if (mCurrentEffect == mCubeCrossEffect)
+ {
+ mCurrentEffect = mCubeFoldEffect;
+ mTitle.Text = APPLICATION_TITLE_FOLD;
+ }
+ else
+ {
+ mCurrentEffect = mCubeWaveEffect;
+ mTitle.Text = APPLICATION_TITLE_WAVE;
+ }
+ mContent.Add(mCurrentEffect);
+
+ // Set the current image to cube transition effect
+ // only need to set at beginning or change from another effect
+ mCurrentEffect.SetCurrentTexture(mCurrentTexture);
+ return true;
+ }
+
+ private bool OnPushButtonClicked(object sender, global::System.EventArgs args)
+ {
+ mSlideshow = !mSlideshow;
+ if (mSlideshow)
+ {
+ mPanGestureDetector.Detach(mContent);
+
+ PropertyMap unselected_bg_map = new PropertyMap();
+ unselected_bg_map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ unselected_bg_map.Add(ImageVisualProperty.URL, new PropertyValue(SLIDE_SHOW_STOP_ICON));
+ mSlideshowButton.UnselectedBackgroundVisual = unselected_bg_map;
+
+ PropertyMap selected_bg_map = new PropertyMap();
+ selected_bg_map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ selected_bg_map.Add(ImageVisualProperty.URL, new PropertyValue(SLIDE_SHOW_STOP_ICON_SELECTED));
+ mSlideshowButton.SelectedBackgroundVisual = selected_bg_map;
+
+ mPanPosition = new Vector2(Window.Instance.WindowSize.Width, Window.Instance.WindowSize.Width * 0.5f);
+ mPanDisplacement = new Vector2(-10.0f, 0.0f);
+
+ mViewTimer.Start();
+ }
+ else
+ {
+ mPanGestureDetector.Attach(mContent);
+
+ PropertyMap unselected_bg_map = new PropertyMap();
+ unselected_bg_map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ unselected_bg_map.Add(ImageVisualProperty.URL, new PropertyValue(SLIDE_SHOW_START_ICON));
+ mSlideshowButton.UnselectedBackgroundVisual = unselected_bg_map;
+
+ PropertyMap selected_bg_map = new PropertyMap();
+ selected_bg_map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ selected_bg_map.Add(ImageVisualProperty.URL, new PropertyValue(SLIDE_SHOW_START_ICON_SELECTED));
+ mSlideshowButton.SelectedBackgroundVisual = selected_bg_map;
+
+ mViewTimer.Stop();
+ }
+ return true;
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class DaliDemo : NUIApplication
+ {
+ public DaliDemo(string styleSheet) : base(styleSheet)
+ {
+ }
+
+ private IExample curExample = null;
+
+ private void FullGC()
+ {
+ global::System.GC.Collect();
+ global::System.GC.WaitForPendingFinalizers();
+ global::System.GC.Collect();
+ }
+
+ private void DeleteDaliDemo()
+ {
+ Window.Instance.Remove(demo.mRootActor);
+ demo.mRootActor.Dispose();
+ demo = null;
+
+ FullGC();
+ }
+
+ private void CreateDaliDemo()
+ {
+ demo = new DaliTableView((string name) =>
+ {
+ string fileName = global::System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
+
+ //global::System.Diagnostics.Process.Start(fileName, name);
+
+ RunSample(name);
+ });
+
+ Assembly assembly = this.GetType().Assembly;
+
+ Type exampleType = assembly.GetType("Tizen.NUI.Samples.IExample");
+
+ foreach (Type type in assembly.GetTypes())
+ {
+ if (exampleType.IsAssignableFrom(type) && type.Name != "SampleMain" && this.GetType() != type && true == type.IsClass)
+ {
+ demo.AddExample(new Example(type.FullName, type.Name));
+ }
+ }
+
+ demo.SortAlphabetically(true);
+
+ demo.Initialize();
+
+ Window.Instance.GetDefaultLayer().Add(demo.mRootActor);
+ }
+
+ private void RunSample(string name)
+ {
+ Assembly assembly = typeof(DaliDemo).Assembly;
+
+ Type exampleType = assembly?.GetType(name);
+ IExample example = assembly?.CreateInstance(name) as IExample;
+
+ if (null != example)
+ {
+ DeleteDaliDemo();
+
+ example.Activate();
+ }
+
+ curExample = example;
+ }
+
+ private void ExitSample()
+ {
+ curExample?.Deactivate();
+ curExample = null;
+
+ FullGC();
+
+ CreateDaliDemo();
+ }
+
+ protected override void OnCreate()
+ {
+ base.OnCreate();
+ CreateDaliDemo();
+
+ Window.Instance.KeyEvent += Instance_KeyEvent;
+ }
+
+ private void Instance_KeyEvent(object sender, Window.KeyEventArgs e)
+ {
+ if (e.Key.State == Key.StateType.Up)
+ {
+ if (e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "BackSpace")
+ {
+ if (null != curExample)
+ {
+ ExitSample();
+ }
+ else
+ {
+ Dispose();
+ }
+ }
+ }
+ }
+
+ public void Deactivate()
+ {
+ demo = null;
+ }
+
+ private DaliTableView demo;
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class Example
+ {
+ public Example(string name, string title)
+ {
+ this.name = name;
+ this.title = title;
+ }
+
+ public Example()
+ {
+ }
+
+ private string name;
+ public string Name
+ {
+ get
+ {
+ return name;
+ }
+ }
+
+ private string title;
+ public string Title
+ {
+ get
+ {
+ return title;
+ }
+ }
+
+ static public int CompareByTitle(Example lhs, Example rhs)
+ {
+ return String.Compare(lhs.title, lhs.title);
+ }
+ };
+
+ public class DaliTableView
+ {
+ static private uint mCurPage = 0;
+
+ static public string DEMO_IMAGE_DIR = CommonResource.GetDaliResourcePath() + "DaliDemo/";
+ static public string LOGO_PATH = DEMO_IMAGE_DIR + "Logo-for-demo.png";
+
+ const float TILE_LABEL_PADDING = 8.0f; // Border between edge of tile and the example text
+ const float BUTTON_PRESS_ANIMATION_TIME = 0.35f; // Time to perform button scale effect.
+ const float ROTATE_ANIMATION_TIME = 0.5f; // Time to perform rotate effect.
+
+ const int EXAMPLES_PER_ROW = 3;
+ const int ROWS_PER_PAGE = 3;
+ const int EXAMPLES_PER_PAGE = EXAMPLES_PER_ROW * ROWS_PER_PAGE;
+
+ Vector3 TABLE_RELATIVE_SIZE = new Vector3(0.95f, 0.9f, 0.8f); // TableView's relative size to the entire stage. The Y value means sum of the logo and table relative heights.
+
+ Vector4[] BUBBLE_COLOR =
+ {
+ new Vector4( 0.3255f, 0.3412f, 0.6353f, 0.32f ),
+ new Vector4( 0.3647f, 0.7569f, 0.8157f, 0.32f ),
+ new Vector4( 0.3804f, 0.7412f, 0.6510f, 0.32f ),
+ new Vector4( 1.0f, 1.0f, 1.0f, 0.13f )
+ };
+
+ const int NUMBER_OF_BUBBLE_COLOR = 4;
+
+ string[] SHAPE_IMAGE_TABLE =
+ {
+ DEMO_IMAGE_DIR + "shape-circle.png",
+ DEMO_IMAGE_DIR + "shape-bubble.png"
+ };
+
+ const int NUMBER_OF_SHAPE_IMAGES = 2;
+ const int NUM_BACKGROUND_IMAGES = 18;
+ const float BACKGROUND_SPREAD_SCALE = 1.5f;
+ const uint BACKGROUND_ANIMATION_DURATION = 15000; // 15 secs
+
+ const float BUBBLE_MIN_Z = -1.0f;
+ const float BUBBLE_MAX_Z = 0.0f;
+
+ const uint CORE_MAJOR_VERSION = 1;
+ const uint CORE_MINOR_VERSION = 4;
+ const uint CORE_MICRO_VERSION = 50;
+
+ const uint ADAPTOR_MAJOR_VERSION = 1;
+ const uint ADAPTOR_MINOR_VERSION = 4;
+ const uint ADAPTOR_MICRO_VERSION = 50;
+
+ const uint TOOLKIT_MAJOR_VERSION = 1;
+ const uint TOOLKIT_MINOR_VERSION = 4;
+ const uint TOOLKIT_MICRO_VERSION = 50;
+
+ public void AddExample(Example example)
+ {
+ mExampleList.Add(example);
+ }
+
+ public void SortAlphabetically(bool sortAlphabetically)
+ {
+ mSortAlphabetically = sortAlphabetically;
+ }
+
+ private const uint FOCUS_ANIMATION_ACTOR_NUMBER = 2;
+
+ public delegate void ExampleClicked(string name);
+
+ private ExampleClicked onClicked;
+
+ public DaliTableView(ExampleClicked onClicked)
+ {
+ this.onClicked = onClicked;
+ }
+
+ public void Initialize()
+ {
+ Window.Instance.KeyEvent += OnKeyEvent;
+
+ Size2D stageSize = Window.Instance.WindowSize;
+
+ // Background
+ mRootActor = CreateBackground("LauncherBackground");
+
+ // Add logo
+ ImageView logo = new ImageView(LOGO_PATH);
+ logo.Name = "LOGO_IMAGE";
+ logo.PositionUsesPivotPoint = true;
+ logo.PivotPoint = PivotPoint.TopCenter;
+ logo.ParentOrigin = new Position(0.5f, 0.1f, 0.5f);
+ logo.WidthResizePolicy = ResizePolicyType.UseNaturalSize;
+ logo.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
+
+ //// The logo should appear on top of everything.
+ mRootActor.Add(logo);
+
+ // Show version in a popup when log is tapped
+ mLogoTapDetector = new TapGestureDetector();
+ mLogoTapDetector.Attach(logo);
+ mLogoTapDetector.Detected += OnLogoTapped;
+
+ // Scrollview occupying the majority of the screen
+ mScrollView = new ScrollView();
+ mScrollView.PositionUsesPivotPoint = true;
+ mScrollView.PivotPoint = PivotPoint.BottomCenter;
+ mScrollView.ParentOrigin = new Vector3(0.5f, 1.0f - 0.05f, 0.5f);
+ mScrollView.WidthResizePolicy = ResizePolicyType.FillToParent;
+ mScrollView.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
+ mScrollView.SetSizeModeFactor(new Vector3(0.0f, 0.6f, 0.0f));
+
+ ushort buttonsPageMargin = (ushort)((1.0f - TABLE_RELATIVE_SIZE.X) * 0.5f * stageSize.Width);
+ mScrollView.SetPadding(new PaddingType(buttonsPageMargin, buttonsPageMargin, 0, 0));
+
+ mScrollView.ScrollCompleted += OnScrollComplete;
+ mScrollView.ScrollStarted += OnScrollStart;
+
+ mPageWidth = stageSize.Width * TABLE_RELATIVE_SIZE.X * 0.5f;
+
+ // Populate background and bubbles - needs to be scrollViewLayer so scroll ends show
+ View bubbleContainer = new View();
+ bubbleContainer.WidthResizePolicy = bubbleContainer.HeightResizePolicy = ResizePolicyType.FillToParent;
+ bubbleContainer.PositionUsesPivotPoint = true;
+ bubbleContainer.PivotPoint = PivotPoint.Center;
+ bubbleContainer.ParentOrigin = ParentOrigin.Center;
+ SetupBackground(bubbleContainer);
+
+ mRootActor.Add(bubbleContainer);
+ mRootActor.Add(mScrollView);
+
+ // Add scroll view effect and setup constraints on pages
+ ApplyScrollViewEffect();
+
+ // Add pages and tiles
+ Populate();
+
+ if (mCurPage != mScrollView.GetCurrentPage())
+ {
+ mScrollView.ScrollTo(mCurPage, 0.0f);
+ }
+
+ // Remove constraints for inner cube effect
+ ApplyCubeEffectToPages();
+
+ // Set initial orientation
+ uint degrees = 0;
+ Rotate(degrees);
+
+ // Background animation
+ mAnimationTimer = new Timer(BACKGROUND_ANIMATION_DURATION);
+ mAnimationTimer.Tick += PauseBackgroundAnimation;
+ mAnimationTimer.Start();
+ mBackgroundAnimsPlaying = true;
+ }
+
+ private bool PauseBackgroundAnimation(object source, Timer.TickEventArgs e)
+ {
+ PauseAnimation();
+ return false;
+ }
+
+ private void PauseAnimation()
+ {
+ if (mBackgroundAnimsPlaying)
+ {
+ foreach (Animation anim in mBackgroundAnimations)
+ {
+ anim.Stop();
+ }
+
+ mBackgroundAnimsPlaying = false;
+ }
+ }
+
+ private void PlayAnimation()
+ {
+ if (!mBackgroundAnimsPlaying)
+ {
+ foreach (Animation anim in mBackgroundAnimations)
+ {
+ anim.Play();
+ }
+
+ mBackgroundAnimsPlaying = true;
+ }
+
+ mAnimationTimer.Interval = BACKGROUND_ANIMATION_DURATION;
+ }
+
+ private void OnKeyEvent(object sender, Window.KeyEventArgs e)
+ {
+ if (e.Key.State == Key.StateType.Down)
+ {
+
+ }
+ }
+
+ private void OnScrollStart(object source, Scrollable.StartedEventArgs e)
+ {
+ mScrolling = true;
+ }
+
+ private void OnScrollComplete(object source, Scrollable.CompletedEventArgs e)
+ {
+ // move focus to 1st item of new page
+ mScrolling = false;
+ mCurPage = mScrollView.GetCurrentPage();
+ }
+
+ private void OnLogoTapped(object source, TapGestureDetector.DetectedEventArgs e)
+ {
+ // Only show if currently fully hidden. If transitioning-out, the transition will not be interrupted.
+ if (!mVersionPopup || (mVersionPopup.DisplayState == Popup.DisplayStateType.Hidden))
+ {
+ if (!mVersionPopup)
+ {
+ string stream = "";
+ stream += "DALi Core: " + CORE_MAJOR_VERSION + "." + CORE_MINOR_VERSION + "." + CORE_MICRO_VERSION + "\n";
+ stream += "DALi Adaptor: " + ADAPTOR_MAJOR_VERSION + "." + ADAPTOR_MINOR_VERSION + "." + ADAPTOR_MICRO_VERSION + "\n";
+ stream += "DALi Toolkit: " + TOOLKIT_MAJOR_VERSION + "." + TOOLKIT_MINOR_VERSION + "." + TOOLKIT_MICRO_VERSION + "\n";
+
+ mVersionPopup = new Popup();
+
+ TextLabel titleActor = new TextLabel("Version information");
+ titleActor.Name = "titleActor";
+ titleActor.HorizontalAlignment = HorizontalAlignment.Center;
+
+ TextLabel contentActor = new TextLabel(stream);
+ contentActor.Name = "contentActor";
+ contentActor.MultiLine = true;
+ contentActor.HorizontalAlignment = HorizontalAlignment.Center;
+ contentActor.SetPadding(new PaddingType(0, 0, 20, 0));
+
+ mVersionPopup.SetTitle(titleActor);
+ mVersionPopup.SetContent(contentActor);
+
+ mVersionPopup.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
+ mVersionPopup.SetSizeModeFactor(new Vector3(0.75f, 1.0f, 1.0f));
+ mVersionPopup.HeightResizePolicy = ResizePolicyType.FitToChildren;
+
+ mVersionPopup.TouchedOutside += HideVersionPopup;
+ mVersionPopup.PositionUsesPivotPoint = true;
+ mVersionPopup.PivotPoint = PivotPoint.Center;
+ mVersionPopup.ParentOrigin = ParentOrigin.Center;
+
+ Window.Instance.Add(mVersionPopup);
+ }
+
+ mVersionPopup.SetDisplayState(Popup.DisplayStateType.Shown);
+ }
+ }
+
+ private void HideVersionPopup(object sender, Popup.TouchedOutsideEventArgs e)
+ {
+ // Only hide if currently fully shown. If transitioning-in, the transition will not be interrupted.
+ if (null != mVersionPopup && (mVersionPopup.DisplayState == Popup.DisplayStateType.Shown))
+ {
+ mVersionPopup.SetDisplayState(Popup.DisplayStateType.Hidden);
+ }
+ }
+
+ // Creates the background image
+ private View CreateBackground(string stylename)
+ {
+ View background = new View();
+ Window.Instance.Add(background);
+ background.SetStyleName(stylename);
+ background.Name = "BACKGROUND";
+ background.PositionUsesPivotPoint = true;
+ background.PivotPoint = PivotPoint.Center;
+ background.ParentOrigin = ParentOrigin.Center;
+ background.WidthResizePolicy = ResizePolicyType.FillToParent;
+ background.HeightResizePolicy = ResizePolicyType.FillToParent;
+ return background;
+ }
+
+ private View CreateTile(string name, string title, Vector3 sizeMultiplier, Vector2 position)
+ {
+ ImageView focusableTile = new ImageView();
+
+ focusableTile.SetStyleName("DemoTile");
+ focusableTile.ResourceUrl = CommonResource.GetDaliResourcePath() + "DaliDemo/demo-tile-texture.9.png";
+ focusableTile.PositionUsesPivotPoint = true;
+ focusableTile.ParentOrigin = ParentOrigin.Center;
+ focusableTile.WidthResizePolicy = focusableTile.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
+ focusableTile.SetSizeModeFactor(sizeMultiplier);
+ focusableTile.Name = name;
+
+ // Set the tile to be keyboard focusable
+ focusableTile.Focusable = true;
+
+ // Register a property with the ImageView. This allows us to inject the scroll-view position into the shader.
+ PropertyValue value = new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f));
+ int propertyIndex = focusableTile.RegisterProperty("uCustomPosition", value);
+
+ // Create an ImageView for the 9-patch border around the tile.
+ ImageView borderImage = new ImageView();
+ borderImage.SetStyleName("DemoTileBorder");
+ borderImage.ResourceUrl = CommonResource.GetDaliResourcePath() + "DaliDemo/item-background.9.png";
+ borderImage.PositionUsesPivotPoint = true;
+ borderImage.PivotPoint = PivotPoint.Center;
+ borderImage.ParentOrigin = ParentOrigin.Center;
+ borderImage.WidthResizePolicy = borderImage.HeightResizePolicy = ResizePolicyType.FillToParent;
+ borderImage.Opacity = 0.8f;
+ focusableTile.Add(borderImage);
+
+ TextLabel label = new TextLabel();
+ label.PositionUsesPivotPoint = true;
+ label.PivotPoint = PivotPoint.Center;
+ label.ParentOrigin = ParentOrigin.Center;
+ label.SetStyleName("LauncherLabel");
+ label.MultiLine = true;
+ label.Text = title;
+ label.HorizontalAlignment = HorizontalAlignment.Center;
+ label.VerticalAlignment = VerticalAlignment.Center;
+ label.HeightResizePolicy = ResizePolicyType.FillToParent;
+
+ // Pad around the label as its size is the same as the 9-patch border. It will overlap it without padding.
+ label.SetPadding(new PaddingType((int)TILE_LABEL_PADDING, (int)TILE_LABEL_PADDING, (int)TILE_LABEL_PADDING, (int)TILE_LABEL_PADDING));
+ focusableTile.Add(label);
+
+ // Connect to the touch events
+ focusableTile.TouchEvent += OnTilePressed;
+
+ return focusableTile;
+ }
+
+ private bool DoTilePress(View actor, PointStateType pointState)
+ {
+ bool consumed = false;
+
+ if (PointStateType.Down == pointState)
+ {
+ mPressedActor = actor;
+ consumed = true;
+ }
+
+ // A button press is only valid if the Down & Up events
+ // both occurred within the button.
+ if ((PointStateType.Up == pointState) &&
+ (mPressedActor == actor))
+ {
+ // ignore Example button presses when scrolling or button animating.
+ if ((!mScrolling) && (!mPressedAnimation))
+ {
+ string name = actor.Name;
+ foreach (Example example in mExampleList)
+ {
+ if (example.Name == name)
+ {
+ consumed = true;
+ break;
+ }
+ }
+ }
+
+ if (consumed)
+ {
+ mPressedAnimation = new Animation((int)(BUTTON_PRESS_ANIMATION_TIME * 1000.0));
+ mPressedAnimation.EndAction = Animation.EndActions.Discard;
+
+ // scale the content actor within the Tile, as to not affect the placement within the Table.
+ View content = actor.GetChildAt(0);
+ mPressedAnimation.AnimateTo(content, "Scale", new Vector3(0.7f, 0.7f, 1.0f), 0, (int)((BUTTON_PRESS_ANIMATION_TIME * 0.5f) * 1000.0), new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut));
+ mPressedAnimation.AnimateTo(content, "Scale", Vector3.One, (int)((BUTTON_PRESS_ANIMATION_TIME * 0.5f) * 1000.0), (int)((BUTTON_PRESS_ANIMATION_TIME * 0.5f) * 1000.0), new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut));
+ mPressedAnimation.AnimateTo(content, "Orientation", new Rotation(new Radian(new Degree(180)), new Vector3(0, 1, 0)));
+ mPressedAnimation.Play();
+ mPressedAnimation.Finished += OnPressedAnimationFinished;
+ }
+ }
+ return consumed;
+ }
+
+ private void OnPressedAnimationFinished(object sender, EventArgs e)
+ {
+ string name = mPressedActor?.Name;
+
+ mPressedAnimation = null;
+ mPressedActor = null;
+
+ onClicked(name);
+ }
+
+ private bool OnTilePressed(object source, View.TouchEventArgs e)
+ {
+ return DoTilePress(source as View, e.Touch.GetState(0));
+ }
+
+ private List<View> tiles = new List<View>();
+
+ private void Populate()
+ {
+ Vector2 stageSize = Window.Instance.WindowSize;
+
+ mTotalPages = (uint)((mExampleList.Count() + EXAMPLES_PER_PAGE - 1) / EXAMPLES_PER_PAGE);
+
+ // Populate ScrollView.
+ if (mExampleList.Count() > 0)
+ {
+ if (mSortAlphabetically)
+ {
+ mExampleList.Sort(Example.CompareByTitle);
+ }
+
+ int pageCount = mExampleList.Count / (ROWS_PER_PAGE * EXAMPLES_PER_ROW) + ((0 == mExampleList.Count % (ROWS_PER_PAGE * EXAMPLES_PER_ROW)) ? 0 : 1);
+ mPages = new View[pageCount];
+
+ int pageIndex = 0;
+
+ uint exampleCount = 0;
+
+ for (int t = 0; t < mTotalPages; t++)
+ {
+ // Create Table
+ TableView page = new TableView(ROWS_PER_PAGE, EXAMPLES_PER_ROW);
+ page.PositionUsesPivotPoint = true;
+ page.PivotPoint = PivotPoint.Center;
+ page.ParentOrigin = ParentOrigin.Center;
+ page.WidthResizePolicy = page.HeightResizePolicy = ResizePolicyType.FillToParent;
+ mScrollView.Add(page);
+
+ // Calculate the number of images going across (columns) within a page, according to the screen resolution and dpi.
+ const float margin = 2.0f;
+ const float tileParentMultiplier = 1.0f / EXAMPLES_PER_ROW;
+
+ for (uint row = 0; row < ROWS_PER_PAGE; row++)
+ {
+ for (uint column = 0; column < EXAMPLES_PER_ROW; column++)
+ {
+ Example example = mExampleList.ElementAt((int)exampleCount++);
+
+ // Calculate the tiles relative position on the page (between 0 & 1 in each dimension).
+ Vector2 position = new Vector2((float)(column) / (EXAMPLES_PER_ROW - 1.0f), (float)(row) / (EXAMPLES_PER_ROW - 1.0f));
+ View tile = CreateTile(example.Name, example.Title, new Vector3(tileParentMultiplier, tileParentMultiplier, 1.0f), position);
+
+ tile.SetPadding(new PaddingType((int)margin, (int)margin, (int)margin, (int)margin));
+ page.AddChild(tile, new TableView.CellPosition(row, column));
+
+ tiles.Add(tile);
+
+ if (exampleCount == mExampleList.Count)
+ {
+ break;
+ }
+ }
+
+ if (exampleCount == mExampleList.Count)
+ {
+ break;
+ }
+ }
+
+ mPages[pageIndex++] = page;
+
+ if (exampleCount == mExampleList.Count)
+ {
+ break;
+ }
+ }
+ }
+
+ // Update Ruler info.
+ mScrollRulerX = new RulerPtr(new FixedRuler(mPageWidth));
+ mScrollRulerY = new RulerPtr(new DefaultRuler());
+ mScrollRulerX.SetDomain(new RulerDomain(0.0f, (mTotalPages + 1) * stageSize.Width * TABLE_RELATIVE_SIZE.X * 0.5f, true));
+ mScrollRulerY.Disable();
+ mScrollView.SetRulerX(mScrollRulerX);
+ mScrollView.SetRulerY(mScrollRulerY);
+ }
+
+ private void SetupBackground(View bubbleContainer)
+ {
+ // Add bubbles to the bubbleContainer.
+ // Note: The bubbleContainer is parented externally to this function.
+ AddBackgroundActors(bubbleContainer, NUM_BACKGROUND_IMAGES);
+ }
+
+ private void AddBackgroundActors(View layer, int count)
+ {
+ int shapeType = 0;
+ Random sizeRandom = new Random(DateTime.Now.Millisecond);
+ Random shapeRandom = new Random(DateTime.Now.Millisecond);
+
+ for (int i = 0; i < count; ++i)
+ {
+ int randSize = sizeRandom.Next(10, 400);
+ shapeType = shapeRandom.Next(0, NUMBER_OF_SHAPE_IMAGES);
+
+ Console.WriteLine("randSize is {0}, shapeType is {1}", randSize, shapeType);
+
+ ImageView dfActor = new ImageView();
+ dfActor.Size2D = new Vector2(randSize, randSize);
+ dfActor.PositionUsesPivotPoint = true;
+ dfActor.ParentOrigin = ParentOrigin.Center;
+
+ // Set the Image URL and the custom shader at the same time
+ PropertyMap effect = CreateDistanceFieldEffect();
+ PropertyMap imageMap = new PropertyMap();
+ imageMap.Insert(ImageVisualProperty.URL, new PropertyValue(SHAPE_IMAGE_TABLE[shapeType]));
+ imageMap.Insert(Visual.Property.Shader, new PropertyValue(effect));
+ imageMap.Insert(Visual.Property.MixColor, new PropertyValue(BUBBLE_COLOR[i % NUMBER_OF_BUBBLE_COLOR]));
+ dfActor.ImageMap = imageMap;
+
+ layer.Add(dfActor);
+ }
+
+ // Positioning will occur when the layer is relaid out
+ layer.Relayout += InitialiseBackgroundActors;
+ }
+
+ private void InitialiseBackgroundActors(object sender, EventArgs e)
+ {
+ // Delete current animations
+ mBackgroundAnimations.Clear();
+ View actor = sender as View;
+
+ // Create new animations
+ Size2D size = actor.Size2D;
+
+ Random childPosRandom = new Random(DateTime.Now.Millisecond);
+ Random animationDurationRandom = new Random(DateTime.Now.Millisecond);
+
+ for (uint i = 0, childCount = actor.GetChildCount(); i < childCount; ++i)
+ {
+ View child = actor.GetChildAt(i);
+
+ // Calculate a random position
+ Vector3 childPos = new Vector3(childPosRandom.Next((int)(-size.Width * 0.5f * BACKGROUND_SPREAD_SCALE), (int)(size.Width * 0.85f * BACKGROUND_SPREAD_SCALE)),
+ childPosRandom.Next((int)(-size.Height), (int)(size.Height)),
+ childPosRandom.Next((int)BUBBLE_MIN_Z, (int)BUBBLE_MAX_Z));
+
+ child.Position = childPos;
+
+ // Kickoff animation
+ Animation animation = new Animation(animationDurationRandom.Next(30, 160) * 1000);
+ animation.AnimateBy(child, "Position", new Vector3(0.0f, -2000.0f, 0.0f), new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));
+ animation.Looping = true;
+ animation.Play();
+ mBackgroundAnimations.Add(animation);
+ }
+ }
+
+ private PropertyMap CreateDistanceFieldEffect()
+ {
+ string fragmentShaderPrefix = "#extension GL_OES_standard_derivatives : enable\n";
+
+ string fragmentShader = "varying mediump vec2 vTexCoord;\n" +
+ "\n" +
+ "uniform mediump float uGlowBoundary;\n" +
+ "uniform mediump vec2 uOutlineParams;\n" +
+ "uniform lowp vec4 uOutlineColor;\n" +
+ "uniform lowp vec4 uShadowColor;\n" +
+ "uniform mediump vec2 uShadowOffset;\n" +
+ "uniform lowp vec4 uGlowColor;\n" +
+ "uniform lowp float uDoOutline;\n" +
+ "uniform lowp float uDoShadow;\n" +
+ "uniform lowp float uDoGlow;\n" +
+ "\n" +
+ "uniform sampler2D sTexture;\n" +
+ "uniform lowp vec4 uColor;\n" +
+ "\n" +
+ "void main()\n" +
+ "{\n" +
+ "// sample distance field\n" +
+ "mediump float smoothing = 0.5;\n" +
+
+ "mediump float distance = texture2D(sTexture, vTexCoord).a;\n" +
+ "mediump float smoothWidth = fwidth(distance);\n" +
+ "mediump float alphaFactor = smoothstep(smoothing - smoothWidth, smoothing + smoothWidth, distance);\n" +
+ "lowp vec4 color;\n" +
+ "if (uDoShadow == 0.0)\n" +
+ "{\n" +
+ "mediump float alpha = uColor.a * alphaFactor;\n" +
+ "lowp vec4 rgb = uColor;\n" +
+ "\n" +
+ "if (uDoOutline > 0.0)\n" +
+ "{\n" +
+ "mediump float outlineWidth = uOutlineParams[1] + smoothWidth;\n" +
+ "mediump float outlineBlend = smoothstep(uOutlineParams[0] - outlineWidth, uOutlineParams[0] + outlineWidth, distance);\n" +
+ "alpha = smoothstep(smoothing - smoothWidth, smoothing + smoothWidth, distance);\n" +
+ "rgb = mix(uOutlineColor, uColor, outlineBlend);\n" +
+ "}\n" +
+ "\n" +
+ "if (uDoGlow > 0.0)\n" +
+ "{\n" +
+ "rgb = mix(uGlowColor, rgb, alphaFactor);\n" +
+ "alpha = smoothstep(uGlowBoundary, smoothing, distance);\n" +
+ "}\n" +
+ "\n" +
+ "// set fragment color\n" +
+ "color = vec4(rgb.rgb, alpha);\n" +
+ "}\n" +
+ "\n" +
+ "else // (uDoShadow > 0.0)\n" +
+ "{\n" +
+ "mediump float shadowDistance = texture2D(sTexture, vTexCoord - uShadowOffset).a;\n" +
+ "mediump float inText = alphaFactor;\n" +
+ "mediump float inShadow = smoothstep(smoothing - smoothWidth, smoothing + smoothWidth, shadowDistance);\n" +
+ "\n" +
+ "// inside object, outside shadow\n" +
+ "if (inText == 1.0)\n" +
+ "{\n" +
+ "color = uColor;\n" +
+ "}\n" +
+ "// inside object, outside shadow\n" +
+ "else if ((inText != 0.0) && (inShadow == 0.0))\n" +
+ "{\n" +
+ "color = uColor;\n" +
+ "color.a *= inText;\n" +
+ "}\n" +
+ "// outside object, completely inside shadow\n" +
+ "else if ((inText == 0.0) && (inShadow == 1.0))\n" +
+ "{\n" +
+ "color = uShadowColor;\n" +
+ "}\n" +
+ "// inside object, completely inside shadow\n" +
+ "else if ((inText != 0.0) && (inShadow == 1.0))\n" +
+ "{\n" +
+ "color = mix(uShadowColor, uColor, inText);\n" +
+ "color.a = uShadowColor.a;\n" +
+ "}\n" +
+ "// inside object, inside shadow's border\n" +
+ "else if ((inText != 0.0) && (inShadow != 0.0))\n" +
+ "{\n" +
+ "color = mix(uShadowColor, uColor, inText);\n" +
+ "color.a *= max(inText, inShadow);\n" +
+ "}\n" +
+ "// inside shadow's border\n" +
+ "else if (inShadow != 0.0)\n" +
+ "{\n" +
+ "color = uShadowColor;\n" +
+ "color.a *= inShadow;\n" +
+ "}\n" +
+ "// outside shadow and object\n" +
+ "else \n" +
+ "{\n" +
+ "color.a = 0.0;\n" +
+ "}\n" +
+ "\n" +
+ "}\n" +
+ "\n" +
+ "gl_FragColor = color;\n" +
+ "\n" +
+ "}";
+
+ PropertyMap map = new PropertyMap();
+
+ PropertyMap customShader = new PropertyMap();
+
+ string fragmentShaderString;
+ fragmentShaderString = fragmentShaderPrefix + fragmentShader;
+
+ customShader.Insert(Visual.ShaderProperty.FragmentShader, new PropertyValue(fragmentShaderString));
+ customShader.Insert(Visual.ShaderProperty.ShaderHints, new PropertyValue((int)Shader.Hint.Value.OUTPUT_IS_TRANSPARENT));
+
+ map.Insert(Visual.Property.Shader, new PropertyValue(customShader));
+ return map;
+ }
+
+ private void ApplyScrollViewEffect()
+ {
+ // Remove old effect if exists.
+ if (mScrollViewEffect)
+ {
+ mScrollView.RemoveEffect(mScrollViewEffect);
+ }
+
+ // Just one effect for now
+ SetupInnerPageCubeEffect();
+
+ mScrollView.ApplyEffect(mScrollViewEffect);
+ }
+
+ private void SetupInnerPageCubeEffect()
+ {
+ Vector2 stageSize = Window.Instance.WindowSize;
+
+ Path path = new Path();
+ PropertyArray points = new PropertyArray();
+ points.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
+ points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
+ points.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
+ path.Points = points;
+
+ PropertyArray controlPoints = new PropertyArray();
+ controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
+ controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.3f, 0.0f, 0.0f)));
+ controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.3f, 0.0f, 0.0f)));
+ controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
+ path.ControlPoints = controlPoints;
+
+ mScrollViewEffect = new ScrollViewPagePathEffect(path,
+ new Vector3(-1.0f, 0.0f, 0.0f),
+ ScrollView.Property.SCROLL_FINAL_X,
+ new Vector3(stageSize.X * TABLE_RELATIVE_SIZE.X, stageSize.Y * TABLE_RELATIVE_SIZE.Y, 0.0f), mTotalPages);
+ }
+
+ void ApplyCubeEffectToPages()
+ {
+ uint pageCount = 0;
+
+ for (int i = 0; i < mPages.Count(); i++)
+ {
+ View page = mPages[i];
+ mScrollViewEffect.ApplyToPage(page, pageCount++);
+ }
+ }
+
+ void Rotate(uint degrees)
+ {
+ // Resize the root actor
+ Vector2 stageSize = Window.Instance.WindowSize;
+ Vector3 targetSize = new Vector3(stageSize.X, stageSize.Y, 1.0f);
+
+ if (degrees == 90 || degrees == 270)
+ {
+ targetSize = new Vector3(stageSize.Y, stageSize.X, 1.0f);
+ }
+
+ if (mRotateAnimation)
+ {
+ mRotateAnimation.Stop();
+ mRotateAnimation.Clear();
+ }
+
+ mRotateAnimation = new Animation((int)(ROTATE_ANIMATION_TIME * 1000.0));
+ mRotateAnimation.AnimateTo(mRootActor, "Orientation", new Rotation(new Radian(new Degree(360 - degrees)), new Vector3(0, 0, 1)), new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut));
+ mRotateAnimation.AnimateTo(mRootActor, "Size", targetSize, new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut));
+ mRotateAnimation.Play();
+ }
+
+ internal View mRootActor; // All content (excluding background is anchored to this Actor)
+ private Animation mRotateAnimation; // Animation to rotate and resize mRootActor.
+ private Animation mPressedAnimation; // Button press scaling animation.
+ private ScrollView mScrollView; // ScrollView container (for all Examples)
+ private ScrollViewPagePathEffect mScrollViewEffect; // Effect to be applied to the scroll view
+ private RulerPtr mScrollRulerX; // ScrollView X (horizontal) ruler
+ private RulerPtr mScrollRulerY; // ScrollView Y (vertical) ruler
+ private View mPressedActor; // The currently pressed actor.
+ private Timer mAnimationTimer; // Timer used to turn off animation after a specific time period
+ private TapGestureDetector mLogoTapDetector; // To detect taps on the logo
+ private Popup mVersionPopup; // Displays DALi library version information
+
+ // This struct encapsulates all data relevant to each of the elements used within the custom keyboard focus effect.
+ private struct FocusEffect
+ {
+ public ImageView actor; // The parent keyboard focus highlight actor
+ public Animation animation; // The animation for the parent keyboard focus highlight actor
+ };
+ FocusEffect[] mFocusEffect = new FocusEffect[FOCUS_ANIMATION_ACTOR_NUMBER]; // The elements used to create the custom focus effect
+
+ private View[] mPages; // List of pages.
+ private List<Animation> mBackgroundAnimations = new List<Animation>(); // List of background bubble animations
+ private List<Example> mExampleList = new List<Example>(); // List of examples.
+
+ private float mPageWidth; // The width of a page within the scroll-view, used to calculate the domain
+ private uint mTotalPages; // Total pages within scrollview.
+
+ private bool mScrolling; // Flag indicating whether view is currently being scrolled
+ private bool mSortAlphabetically; // Sort examples alphabetically.
+ private bool mBackgroundAnimsPlaying; // Are background animations playing
+ }
+}
--- /dev/null
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class DropDownSample : IExample
+ {
+ private View root;
+
+ private TextLabel[] createText = new TextLabel[2];
+
+ private DropDown dropDown = null;
+ private DropDown dropDown2 = null;
+ private ScrollBar scrollBar = null;
+ private ScrollBar scrollBar2 = null;
+
+ private static string[] mode = new string[]
+ {
+ "Utility DropDown",
+ "Family DropDown",
+ "Food DropDown",
+ "Kitchen DropDown",
+ };
+ private static Color[] color = new Color[]
+ {
+ new Color(0.05f, 0.63f, 0.9f, 1),//#ff0ea1e6 Utility
+ new Color(0.14f, 0.77f, 0.28f, 1),//#ff24c447 Family
+ new Color(0.75f, 0.46f, 0.06f, 1),//#ffec7510 Food
+ new Color(0.59f, 0.38f, 0.85f, 1),//#ff9762d9 Kitchen
+ };
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ BackgroundColor = Color.White,
+ };
+ window.Add(root);
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ createText[0] = new TextLabel();
+ createText[0].Text = "Create DropDown just by properties";
+ createText[0].Size2D = new Size2D(450, 100);
+ createText[0].Position2D = new Position2D(200, 100);
+ createText[0].MultiLine = true;
+ root.Add(createText[0]);
+
+ #region CreateByProperty
+ dropDown = new DropDown();
+ dropDown.Size2D = new Size2D(900, 108);
+ dropDown.Position2D = new Position2D(50, 300);
+ dropDown.Style.HeaderText.Text = "TitleArea";
+ dropDown.Style.HeaderText.TextColor = new Color(0, 0, 0, 1);
+ dropDown.Style.HeaderText.PointSize = 28;
+ dropDown.Style.HeaderText.FontFamily = "SamsungOneUI 500C";
+ dropDown.Style.Button.Text.Text = "DropDown Text";
+ dropDown.Style.Button.Text.TextColor = new Color(0, 0, 0, 1);
+ dropDown.Style.Button.Text.PointSize = 20;
+ dropDown.Style.Button.Text.FontFamily = "SamsungOneUI 500";
+ dropDown.Style.Button.Icon.ResourceUrl = CommonResource.GetFHResourcePath() + "6. List/list_ic_dropdown.png";
+ dropDown.Style.Button.Icon.Size = new Size(48, 48);
+ dropDown.Style.Button.IconRelativeOrientation = Button.IconOrientation.Right;
+ dropDown.Style.Button.PositionX = 56;
+ dropDown.SpaceBetweenButtonTextAndIcon = 8;
+ dropDown.Style.ListBackgroundImage.ResourceUrl = CommonResource.GetFHResourcePath() + "10. Drop Down/dropdown_bg.png";
+ dropDown.Style.ListBackgroundImage.Border = new Rectangle(51, 51, 51, 51);
+ dropDown.Style.ListBackgroundImage.Size = new Size(360, 500);
+ dropDown.ListMargin.Start = 20;
+ dropDown.ListMargin.Top = 20;
+ dropDown.ListPadding = new Extents(4, 4, 4, 4);
+ root.Add(dropDown);
+
+ for (int i = 0; i < 8; i++)
+ {
+ DropDown.DropDownDataItem item = new DropDown.DropDownDataItem();
+ item.Size = new Size(360, 96);
+ item.BackgroundColor= new Selector<Color>
+ {
+ Pressed = new Color(0, 0, 0, 0.4f),
+ Other = new Color(1, 1, 1, 0),
+ };
+ item.Text = "Normal list " + i;
+ item.PointSize = 18;
+ item.FontFamily = "SamsungOne 500";
+ item.TextPosition = new Position(28, 0);
+ item.CheckImageSize = new Size(40, 40);
+ item.CheckImageResourceUrl = CommonResource.GetFHResourcePath() + "10. Drop Down/dropdown_checkbox_on.png";
+ item.CheckImageGapToBoundary = 16;
+ dropDown.AddItem(item);
+ }
+
+ dropDown.SelectedItemIndex = 3;
+ //dropDown.DeleteItem(1);
+
+ //DropDown.DropDownItemData insertItem = new DropDown.DropDownItemData();
+ //insertItem.Size2D = new Size2D(360, 96);
+ //insertItem.BackgroundColorSelector = new Selector<Color>
+ //{
+ // Pressed = new Color(0, 0, 0, 0.4f),
+ // Other = new Color(1, 1, 1, 0),
+ //};
+ //insertItem.Text = "Insert Normal list ";
+ //insertItem.PointSize = 18;
+ //insertItem.FontFamily = "SamsungOne 500";
+ //insertItem.TextPosition2D = new Position2D(28, 0);
+ //insertItem.CheckImageSize = new Size2D(40, 40);
+ //insertItem.CheckImageResourceUrl = CommonReosurce.GetFHResourcePath() + "10. Drop Down/dropdown_checkbox_on.png";
+ //insertItem.CheckImageRightSpace = 16;
+ //dropDown.InsertItem(insertItem, 1);
+ ////////Attach scrollbar///////////
+ scrollBar = new ScrollBar();
+ scrollBar.Direction = ScrollBar.DirectionType.Vertical;
+ scrollBar.Position2D = new Position2D(394, 2);
+ scrollBar.Size2D = new Size2D(4, 446);
+ scrollBar.Style.Track.BackgroundColor = Color.Green;
+ scrollBar.Style.Thumb.Size = new Size(4, 30);
+ scrollBar.Style.Thumb.BackgroundColor = Color.Yellow;
+ scrollBar.Style.Track.ResourceUrl = CommonResource.GetTVResourcePath() + "component/c_progressbar/c_progressbar_white_buffering.png";
+ dropDown.AttachScrollBar(scrollBar);
+
+ #endregion
+ ///////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ createText[1] = new TextLabel();
+ createText[1].Text = "Create DropDown just by Attributes";
+ createText[1].Size2D = new Size2D(450, 100);
+ createText[1].Position2D = new Position2D(1000, 100);
+ createText[1].MultiLine = true;
+ root.Add(createText[1]);
+
+ #region CreateByAttributes
+
+ DropDownStyle attrs = new DropDownStyle
+ {
+ HeaderText = new TextLabelStyle
+ {
+ Text = new Selector<string> { All = "TitleArea" },
+ PointSize = new Selector<float?> { All = 28 },
+ TextColor = new Selector<Color> { All = new Color(0, 0, 0, 1) },
+ FontFamily = "SamsungOneUI 500C",
+ },
+
+ Button = new ButtonStyle
+ {
+ Text = new TextLabelStyle
+ {
+ Text = new Selector<string> { All = "DropDown Text" },
+ PointSize = new Selector<float?> { All = 20 },
+ TextColor = new Selector<Color> { All = new Color(0, 0, 0, 1) },
+ FontFamily = "SamsungOneUI 500",
+ },
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "6. List/list_ic_dropdown.png" },
+ },
+ IconRelativeOrientation = Button.IconOrientation.Right,
+ PositionX = 56,
+ },
+ ListBackgroundImage = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "10. Drop Down/dropdown_bg.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(51, 51, 51, 51) },
+ Size = new Size(360, 500),
+ },
+ SpaceBetweenButtonTextAndIcon = 8,
+ ListMargin = new Extents(20, 0, 20, 0),
+ BackgroundColor = new Selector<Color> { All = new Color(1, 1, 1, 1) },
+ ListPadding = new Extents(4, 4, 4, 4),
+ };
+
+ dropDown2 = new DropDown(attrs);
+ dropDown2.Size2D = new Size2D(900, 108);
+ dropDown2.Position2D = new Position2D(1000, 300);
+ root.Add(dropDown2);
+
+ DropDownItemStyle itemAttrs = new DropDownItemStyle
+ {
+ BackgroundColor = new Selector<Color>
+ {
+ Pressed = new Color(0, 0, 0, 0.4f),
+ Other = new Color(1, 1, 1, 0),
+ },
+ Text = new TextLabelStyle
+ {
+ PointSize = new Selector<float?> { All = 18 },
+ FontFamily = "SamsungOne 500",
+ Position = new Position(28, 0),
+ },
+ CheckImage = new ImageViewStyle
+ {
+ Size = new Size(40, 40),
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "10. Drop Down/dropdown_checkbox_on.png" },
+ },
+ CheckImageGapToBoundary = 16,
+ };
+
+ for (int i = 0; i < 8; i++)
+ {
+ DropDown.DropDownDataItem item = new DropDown.DropDownDataItem(itemAttrs);
+ item.Size = new Size(360, 96);
+ item.Text = "Normal list " + i;
+ dropDown2.AddItem(item);
+ }
+ dropDown2.SelectedItemIndex = 0;
+
+ ////////Attach scrollbar///////////
+ scrollBar2 = new ScrollBar();
+ scrollBar2.Direction = ScrollBar.DirectionType.Vertical;
+ scrollBar2.Position2D = new Position2D(394, 2);
+ scrollBar2.Size2D = new Size2D(4, 446);
+ scrollBar2.Style.Track.BackgroundColor = Color.Green;
+ scrollBar2.Style.Thumb.Size = new Size(4, 30);
+ scrollBar2.Style.Thumb.BackgroundColor = Color.Yellow;
+ scrollBar2.Style.Track.ResourceUrl = CommonResource.GetTVResourcePath() + "component/c_progressbar/c_progressbar_white_buffering.png";
+ dropDown2.AttachScrollBar(scrollBar2);
+
+ #endregion
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ if (dropDown != null)
+ {
+ if (scrollBar != null)
+ {
+ dropDown.DetachScrollBar();
+ scrollBar.Dispose();
+ scrollBar = null;
+ }
+
+ root.Remove(dropDown);
+ dropDown.Dispose();
+ dropDown = null;
+ }
+ if (dropDown2 != null)
+ {
+ if (scrollBar2 != null)
+ {
+ dropDown2.DetachScrollBar();
+ scrollBar2.Dispose();
+ scrollBar2 = null;
+ }
+
+ root.Remove(dropDown2);
+ dropDown2.Dispose();
+ dropDown2 = null;
+ }
+
+ if (createText[0] != null)
+ {
+ root.Remove(createText[0]);
+ createText[0].Dispose();
+ createText[0] = null;
+ }
+ if (createText[1] != null)
+ {
+ root.Remove(createText[1]);
+ createText[1].Dispose();
+ createText[1] = null;
+ }
+
+ Window.Instance.Remove(root);
+ root.Dispose();
+ root = null;
+ }
+ }
+ }
+}
--- /dev/null
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Samples
+{
+
+ public class ListItemData
+ {
+ private string str;
+
+ public ListItemData(int i)
+ {
+ str = "Text" + i.ToString();
+ }
+
+ public string TextString
+ {
+ get
+ {
+ return str;
+ }
+ }
+ }
+
+ public class ListItemView : View
+ {
+ private TextLabel mText;
+
+ public ListItemView()
+ {
+ mText = new TextLabel();
+ mText.WidthResizePolicy = ResizePolicyType.FillToParent;
+ mText.HeightResizePolicy = ResizePolicyType.FillToParent;
+ mText.PointSize = 22;
+ mText.HorizontalAlignment = HorizontalAlignment.Center;
+ mText.VerticalAlignment = VerticalAlignment.Center;
+ Add(mText);
+ }
+
+ public string MainText
+ {
+ get
+ {
+ return mText.Text;
+ }
+ set
+ {
+ mText.Text = value;
+ }
+ }
+ }
+
+ public class ListBridge : FlexibleView.Adapter
+ {
+ private List<ListItemData> mDatas;
+
+ public ListBridge(List<ListItemData> datas)
+ {
+ mDatas = datas;
+ }
+
+ public void InsertData(int position)
+ {
+ mDatas.Insert(position, new ListItemData(1000 + position));
+ NotifyItemInserted(position);
+ }
+
+ public void RemoveData(int position)
+ {
+ mDatas.RemoveAt(position);
+ NotifyItemRemoved(position);
+ }
+
+ public override FlexibleView.ViewHolder OnCreateViewHolder(int viewType)
+ {
+ FlexibleView.ViewHolder viewHolder = new FlexibleView.ViewHolder(new ListItemView());
+ //Console.WriteLine($"OnCreateViewHolder... viewType: {viewType} viewID: {viewHolder.ItemView.ID}");
+
+ return viewHolder;
+ }
+
+ public override void OnBindViewHolder(FlexibleView.ViewHolder holder, int position)
+ {
+ //Console.WriteLine($"OnBindItemView... position: {position}");
+ ListItemData listItemData = mDatas[position];
+
+ ListItemView listItemView = holder.ItemView as ListItemView;
+ listItemView.Name = "Item" + position;
+ //Random rd = new Random();
+ listItemView.SizeWidth = 150;
+ listItemView.SizeHeight = 60;
+ if (listItemView != null)
+ {
+ listItemView.MainText = String.Format("{0:D2}", position) + " : " + listItemData.TextString;
+ }
+ listItemView.Margin = new Extents(2, 2, 2, 2);
+ if (position % 2 == 0)
+ listItemView.BackgroundColor = Color.Cyan;
+ else
+ listItemView.BackgroundColor = Color.Yellow;
+ }
+
+ public override void OnDestroyViewHolder(FlexibleView.ViewHolder holder)
+ {
+ //Console.WriteLine($"OnDestroyViewHolder... viewID: {holder.ItemView?.ID}");
+ if (holder.ItemView != null)
+ {
+ holder.ItemView.Dispose();
+ }
+ }
+
+ public override int GetItemCount()
+ {
+ return mDatas.Count;
+ }
+
+ public override void OnFocusChange(FlexibleView flexibleView, int previousFocus, int currentFocus)
+ {
+ FlexibleView.ViewHolder previousFocusView = flexibleView.FindViewHolderForAdapterPosition(previousFocus);
+ if (previousFocusView != null)
+ {
+ //Console.WriteLine($"previousFocus {previousFocus.AdapterPosition}");
+ if (previousFocusView.AdapterPosition % 2 == 0)
+ previousFocusView.ItemView.BackgroundColor = Color.Cyan;
+ else
+ previousFocusView.ItemView.BackgroundColor = Color.Yellow;
+ //previousFocus.SizeWidth = 150;
+ //previousFocus.SizeHeight = 60;
+ //NotifyItemChanged(previousFocus.AdapterPosition);
+ }
+ FlexibleView.ViewHolder currentFocusView = flexibleView.FindViewHolderForAdapterPosition(currentFocus);
+ if (currentFocusView != null)
+ {
+ //Console.WriteLine($"currentFocus {currentFocus.AdapterPosition}");
+ currentFocusView.ItemView.BackgroundColor = Color.Magenta;
+ //currentFocus.SizeWidth = 200;
+ //currentFocus.SizeHeight = 100;
+ //NotifyItemChanged(currentFocus.AdapterPosition);
+ }
+ }
+
+ public override void OnViewAttachedToWindow(FlexibleView.ViewHolder holder)
+ {
+ //Console.WriteLine($"+Attached: {holder.AdapterPosition}");
+ }
+
+ public override void OnViewDetachedFromWindow(FlexibleView.ViewHolder holder)
+ {
+ //Console.WriteLine($" --Detached: {holder.AdapterPosition}");
+ }
+
+ }
+
+ public class FlexibleViewSample : IExample
+ {
+ private FlexibleView flexibleView1;
+ private FlexibleView flexibleView2;
+ private ListBridge adapter;
+
+ private ScrollBar scrollBar1;
+ private ScrollBar scrollBar2;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ flexibleView1 = new FlexibleView();
+ flexibleView1.Name = "RecyclerView";
+ flexibleView1.Position2D = new Position2D(500, 200);
+ flexibleView1.Size2D = new Size2D(400, 450);
+ flexibleView1.Padding = new Extents(10, 10, 10, 10);
+ flexibleView1.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.4f);
+
+ List<ListItemData> dataList = new List<ListItemData>();
+ for (int i = 0; i < 131; ++i)
+ {
+ dataList.Add(new ListItemData(i));
+ }
+ adapter = new ListBridge(dataList);
+ flexibleView1.SetAdapter(adapter);
+
+ LinearLayoutManager layoutManager1 = new LinearLayoutManager(LinearLayoutManager.VERTICAL);
+ //GridLayoutManager layoutManager1 = new GridLayoutManager(3, LinearLayoutManager.VERTICAL);
+ flexibleView1.SetLayoutManager(layoutManager1);
+
+ flexibleView1.FocusedItemIndex = 0;
+
+ window.Add(flexibleView1);
+
+ flexibleView1.Focusable = true;
+
+ flexibleView1.KeyEvent += RecyclerView_KeyEvent;
+ flexibleView1.FocusGained += FlexibleView_FocusGained;
+ flexibleView1.FocusLost += FlexibleView_FocusLost;
+
+ scrollBar1 = new ScrollBar();
+ scrollBar1.Direction = ScrollBar.DirectionType.Vertical;
+ scrollBar1.Position2D = new Position2D(394, 2);
+ scrollBar1.Size2D = new Size2D(4, 446);
+ scrollBar1.Style.Track.BackgroundColor = Color.Green;
+ scrollBar1.Style.Thumb.Size = new Size(4, 30);
+ scrollBar1.Style.Thumb.BackgroundColor = Color.Yellow;
+ scrollBar1.Style.Track.ResourceUrl = CommonResource.GetTVResourcePath() + "component/c_progressbar/c_progressbar_white_buffering.png";
+ flexibleView1.AttachScrollBar(scrollBar1);
+
+
+ flexibleView2 = new FlexibleView();
+ flexibleView2.Name = "RecyclerView";
+ flexibleView2.Position2D = new Position2D(500, 800);
+ flexibleView2.Size2D = new Size2D(700, 200);
+ flexibleView2.Padding = new Extents(10, 10, 10, 10);
+ flexibleView2.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.4f);
+
+ flexibleView2.SetAdapter(adapter);
+
+ GridLayoutManager layoutManager2 = new GridLayoutManager(3, LinearLayoutManager.HORIZONTAL);
+ flexibleView2.SetLayoutManager(layoutManager2);
+
+ flexibleView2.FocusedItemIndex = 0;
+
+ window.Add(flexibleView2);
+
+ flexibleView2.Focusable = true;
+
+ flexibleView2.KeyEvent += RecyclerView_KeyEvent;
+ flexibleView2.FocusGained += FlexibleView_FocusGained;
+ flexibleView2.FocusLost += FlexibleView_FocusLost;
+
+ scrollBar2 = new ScrollBar();
+ scrollBar2.Position2D = new Position2D(2, 194);
+ scrollBar2.Size2D = new Size2D(696, 4);
+ scrollBar2.Style.Track.BackgroundColor = Color.Green;
+ scrollBar2.Style.Thumb.Size = new Size(30, 4);
+ scrollBar2.Style.Thumb.BackgroundColor = Color.Yellow;
+ scrollBar2.Style.Track.ResourceUrl = CommonResource.GetTVResourcePath() + "component/c_progressbar/c_progressbar_white_buffering.png";
+ flexibleView2.AttachScrollBar(scrollBar2);
+
+
+ FocusManager.Instance.SetCurrentFocusView(flexibleView1);
+ }
+
+ private void FlexibleView_FocusLost(object sender, EventArgs e)
+ {
+ View flexibleView = sender as View;
+ flexibleView.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.4f);
+ }
+
+ private void FlexibleView_FocusGained(object sender, EventArgs e)
+ {
+ View flexibleView = sender as View;
+ flexibleView.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.8f);
+ }
+
+ private bool RecyclerView_KeyEvent(object source, View.KeyEventArgs e)
+ {
+ FlexibleView flexibleView = source as FlexibleView;
+ return ProcessKey(flexibleView, e.Key);
+ }
+
+ private bool ProcessKey(FlexibleView flexibleView, Key key)
+ {
+ if (key.State == Key.StateType.Down)
+ {
+ if (key.KeyPressedName == "Up")
+ {
+ flexibleView.MoveFocus(FlexibleView.LayoutManager.Direction.Up);
+ }
+ else if (key.KeyPressedName == "Down")
+ {
+ flexibleView.MoveFocus(FlexibleView.LayoutManager.Direction.Down);
+ }
+ if (key.KeyPressedName == "Left")
+ {
+ flexibleView.MoveFocus(FlexibleView.LayoutManager.Direction.Left);
+ }
+ else if (key.KeyPressedName == "Right")
+ {
+ flexibleView.MoveFocus(FlexibleView.LayoutManager.Direction.Right);
+ }
+ else if (key.KeyPressedName == "0")
+ {
+ if (flexibleView == flexibleView1)
+ {
+ FocusManager.Instance.SetCurrentFocusView(flexibleView2);
+ }
+ else if (flexibleView == flexibleView2)
+ {
+ FocusManager.Instance.SetCurrentFocusView(flexibleView1);
+ }
+ }
+ else if (key.KeyPressedName == "1")
+ {
+ adapter.InsertData(1);
+ }
+ else if (key.KeyPressedName == "2")
+ {
+ adapter.RemoveData(1);
+ }
+ else if (key.KeyPressedName == "8")
+ {
+ flexibleView.FocusedItemIndex = 0;
+ }
+ else if (key.KeyPressedName == "9")
+ {
+ flexibleView.FocusedItemIndex = 15;
+ }
+ else if (key.KeyPressedName == "7")
+ {
+ }
+ }
+
+ return false;
+ }
+
+ public void Deactivate()
+ {
+ flexibleView1.DetachScrollBar();
+ scrollBar1.Dispose();
+ flexibleView2.DetachScrollBar();
+ scrollBar2.Dispose();
+
+ Window window = Window.Instance;
+ window.Remove(flexibleView1);
+ flexibleView1.Dispose();
+ window.Remove(flexibleView2);
+ flexibleView2.Dispose();
+
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class InputFieldSample : IExample
+ {
+ private TextLabel guideText;
+ private View rootView;
+ InputField inputField;
+ InputFieldStyle inputFieldAttrs;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ rootView = new View()
+ {
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ BackgroundColor = new Color(0.8f, 0.8f, 0.8f, 0.8f),
+ Focusable = true
+ };
+ window.Add(rootView);
+ rootView.TouchEvent += OnRootViewTouchEvent;
+ CreateInputField();
+ CreateGuideText();
+ }
+
+ private void CreateGuideText()
+ {
+ guideText = new TextLabel();
+ guideText.Size2D = new Size2D(1600, 150);
+ guideText.Position2D = new Position2D(30, 30);
+ guideText.TextColor = Color.Blue;
+ guideText.BackgroundColor = Color.White;
+ guideText.PointSize = 15;
+ guideText.MultiLine = true;
+ guideText.Focusable = true;
+ rootView.Add(guideText);
+ guideText.Text =
+ "Tips: \n" +
+ "This InputField is created with attibutes; \n" +
+ "User can input text after press on it; \n" +
+ "User can exit the sample by press \"Esc\" key after touch on any area except the InputField.";
+ }
+
+ private void CreateInputField()
+ {
+ inputFieldAttrs = new InputFieldStyle();
+ inputFieldAttrs.Space = 24;
+ inputFieldAttrs.BackgroundImageAttributes = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "1. Action bar/search_bg.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(45, 45, 0, 0) }
+ };
+
+ inputFieldAttrs.InputBoxAttributes = new TextFieldStyle
+ {
+ TextColor = new Selector<Color>
+ {
+ Normal = new Color(0, 0, 0, 1),
+ Pressed = new Color(0, 0, 0, 1),
+ Disabled = new Color(0, 0, 0, 0.4f)
+ },
+ PlaceholderTextColor = new Selector<Color>
+ {
+ All = new Color(0, 0, 0, 0.4f)
+ },
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Center,
+ FontFamily = "SamsungOne 500",
+ PointSize = new Selector<float?>
+ {
+ All = 38
+ },
+ CursorWidth = 2,
+ };
+
+ inputField = new InputField(inputFieldAttrs);
+ inputField.Size2D = new Size2D(1600, 95);
+ inputField.Position2D = new Position2D(100, 300);
+ //inputField.Focusable = true;
+ rootView.Add(inputField);
+ inputField.FocusGained += onFocusGained;
+ inputField.FocusLost += onFocusLost;
+ //inputField.TouchEvent += onTouchEvent;
+ inputField.HintText = "Please input key word...";
+ }
+
+ private bool OnRootViewTouchEvent(object sender, View.TouchEventArgs e)
+ {
+ FocusManager.Instance.SetCurrentFocusView(rootView);
+ return false;
+ }
+
+ private void onFocusLost(object sender, EventArgs e)
+ {
+
+ }
+
+ private void onFocusGained(object sender, EventArgs e)
+ {
+
+ }
+
+ //private bool onTouchEvent(object sender, View.TouchEventArgs e)
+ //{
+ // return false;
+ //}
+
+ public void Deactivate()
+ {
+ if (inputField != null)
+ {
+ inputField.FocusGained -= onFocusGained;
+ inputField.FocusLost -= onFocusLost;
+ //inputField.TouchEvent -= onTouchEvent;
+ rootView.Remove(inputField);
+ inputField.Dispose();
+ inputField = null;
+ }
+ if (rootView != null)
+ {
+ rootView.TouchEvent -= OnRootViewTouchEvent;
+ Window.Instance.Remove(rootView);
+ rootView.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public delegate uint GetNumberOfItems();
+ public delegate View NewItem(uint itemId);
+
+ public class ItemFactoryWrapper : ItemFactory
+ {
+ public GetNumberOfItems GetNumberDelegate { get; set; }
+
+ public NewItem NewItemDelegate { get; set; }
+
+ public ItemFactoryWrapper()
+ {
+ GetNumberDelegate = null;
+ NewItemDelegate = null;
+ }
+ public override uint GetNumberOfItems()
+ {
+ if (GetNumberDelegate != null)
+ {
+ return GetNumberDelegate();
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ public override View NewItem(uint itemId)
+ {
+ if (NewItemDelegate != null)
+ {
+ return NewItemDelegate(itemId);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+}
--- /dev/null
+using System;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class ZItemViewSample : IExample
+ {
+ private const float MIN_SWIPE_DISTANCE = 15.0f;
+ private const float MIN_SWIPE_SPEED = 5.0f;
+ private const float SCROLL_TO_ITEM_ANIMATION_TIME = 5.0f;
+ private const float DEPTH_LAYOUT_ITEM_SIZE_FACTOR_PORTRAIT = 1.0f;
+ private const float DEPTH_LAYOUT_ITEM_SIZE_FACTOR_LANDSCAPE = 0.8f;
+ private const float DEPTH_LAYOUT_COLUMNS = 3.0f;
+ private const int BUTTON_BORDER = -10;
+ private const float ITEM_BORDER_SIZE = 2.0f;
+ private const int ITEM_COUNT = 300;
+
+ private string APPLICATION_TITLE = "ItemView";
+ private string SPIRAL_LABEL = "Spiral";
+ private string GRID_LABEL = "Grid";
+ private string DEPTH_LABEL = "Depth";
+
+ private string TOOLBAR_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/top-bar.png";
+ private string EDIT_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-edit.png";
+ private string EDIT_IMAGE_SELECTED = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-edit-selected.png";
+ private string DELETE_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-delete.png";
+ private string DELETE_IMAGE_SELECTED = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-delete-selected.png";
+ private string REPLACE_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-replace.png";
+ private string REPLACE_IMAGE_SELECTED = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-replace-selected.png";
+ private string INSERT_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-insert.png";
+ private string INSERT_IMAGE_SELECTED = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-insert-selected.png.png";
+ private string SELECTED_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/item-select-check.png";
+
+ private string SPIRAL_LAYOUT_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-item-view-layout-spiral.png";
+ private string SPIRAL_LAYOUT_IMAGE_SELECTED = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-item-view-layout-spiral-selected.png";
+ private string GRID_LAYOUT_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-item-view-layout-grid.png";
+ private string GRID_LAYOUT_IMAGE_SELECTED = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-item-view-layout-grid-selected.png";
+ private string DEPTH_LAYOUT_IMAGE = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-item-view-layout-depth.png";
+ private string DEPTH_LAYOUT_IMAGE_SELECTED = CommonResource.GetDaliResourcePath() + "ItemViewDemo/icon-item-view-layout-depth-selected.png";
+
+
+ private ItemView mItemView;
+ private ItemFactoryWrapper mItemFactoryWrapper;
+ private PropertyMap mGridLayout;
+ private PropertyMap mDepthLayout;
+ private PropertyMap mSpiralLayout;
+ private PropertyArray mLayout;
+ private int mCurrentLayout = (int)AllImagesLayouts.SPIRAL_LAYOUT;
+ private Mode mMode = Mode.MODE_NORMAL;
+
+ private LongPressGestureDetector mLongPressGestureDetector;
+ private TapGestureDetector mTapDetector;
+
+ private PushButton mLayoutButton;
+ private PushButton mEditButton;
+ private PushButton mDeleteButton;
+ private PushButton mInsertButton;
+ private PushButton mReplaceButton;
+ private TextLabel mTitle;
+ private ImageView mToolBarBackground;
+
+ private Layer mToolBarLayer;
+ private View mContentView;
+
+ private int mDurationSeconds = 250;
+
+ public static Vector3 DepthLayoutItemSizeFunctionPortrait(float layoutWidth)
+ {
+ float width = (layoutWidth / (DEPTH_LAYOUT_COLUMNS + 1.0f)) * DEPTH_LAYOUT_ITEM_SIZE_FACTOR_PORTRAIT;
+
+ // 1x1 aspect ratio
+ return new Vector3(width, width, width);
+ }
+
+ public static Vector3 DepthLayoutItemSizeFunctionLandscape(float layoutWidth)
+ {
+ float width = (layoutWidth / (DEPTH_LAYOUT_COLUMNS + 1.0f)) * DEPTH_LAYOUT_ITEM_SIZE_FACTOR_LANDSCAPE;
+
+ // 1x1 aspect ratio
+ return new Vector3(width, width, width);
+ }
+
+ private void SetTitle(string title)
+ {
+ if (mTitle != null)
+ {
+ mTitle.Text = title;
+ }
+ }
+
+ public void CreateGridLayout()
+ {
+ mGridLayout = new PropertyMap();
+ mGridLayout.Insert((int)DefaultItemLayoutProperty.TYPE, new PropertyValue((int)DefaultItemLayoutType.GRID));
+ }
+
+ public void CreateDepthLayout()
+ {
+ mDepthLayout = new PropertyMap();
+ mDepthLayout.Insert((int)DefaultItemLayoutProperty.TYPE, new PropertyValue((int)DefaultItemLayoutType.DEPTH));
+ }
+
+ public void CreateSpiralLayout()
+ {
+ mSpiralLayout = new PropertyMap();
+ mSpiralLayout.Insert((int)DefaultItemLayoutProperty.TYPE, new PropertyValue((int)DefaultItemLayoutType.SPIRAL));
+ }
+
+ void SetLayoutImage()
+ {
+ if (mLayoutButton)
+ {
+ switch (mCurrentLayout)
+ {
+ case (int)AllImagesLayouts.SPIRAL_LAYOUT:
+ {
+ mLayoutButton.UnselectedBackgroundVisual = CreateImageVisual(SPIRAL_LAYOUT_IMAGE);
+ mLayoutButton.SelectedBackgroundVisual = CreateImageVisual(SPIRAL_LAYOUT_IMAGE_SELECTED);
+ break;
+ }
+
+ case (int)AllImagesLayouts.GRID_LAYOUT:
+ {
+ mLayoutButton.UnselectedBackgroundVisual = CreateImageVisual(GRID_LAYOUT_IMAGE);
+ mLayoutButton.SelectedBackgroundVisual = CreateImageVisual(GRID_LAYOUT_IMAGE_SELECTED);
+ break;
+ }
+
+ case (int)AllImagesLayouts.DEPTH_LAYOUT:
+ {
+ mLayoutButton.UnselectedBackgroundVisual = CreateImageVisual(DEPTH_LAYOUT_IMAGE);
+ mLayoutButton.SelectedBackgroundVisual = CreateImageVisual(DEPTH_LAYOUT_IMAGE_SELECTED);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+
+ void ChangeLayout()
+ {
+ Animation animation = new Animation(mDurationSeconds);
+ animation.Finished += AnimationFinished;
+ animation.AnimateTo(mItemView, "Opacity", 0.0f);
+ animation.Play();
+ }
+
+ void AnimationFinished(object sender, EventArgs e)
+ {
+ SetLayout(mCurrentLayout);
+ Animation animation = new Animation(mDurationSeconds);
+ animation.AnimateTo(mItemView, "Opacity", 1.0f);
+ animation.Play();
+ }
+
+ private PropertyMap CreateImageVisual(string url)
+ {
+ PropertyMap temp = new PropertyMap();
+ temp.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ temp.Insert(ImageVisualProperty.URL, new PropertyValue(url));
+ return temp;
+ }
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+ window.GetDefaultLayer().Behavior = Layer.LayerBehavior.Layer3D;
+ window.BackgroundColor = Color.Black;
+ CreateContentView();
+ //CreateToolBarView();
+ CreateToolBarLayer();
+
+ CreateLayoutButton();
+ CreateEditButton();
+ CreateInsertButton();
+ CreateReplaceButton();
+ CreateDeleteButton();
+
+ CreateGridLayout();
+ CreateDepthLayout();
+ CreateSpiralLayout();
+
+ mLayout = new PropertyArray();
+ mLayout.PushBack(new PropertyValue(mSpiralLayout));
+ mLayout.PushBack(new PropertyValue(mDepthLayout));
+ mLayout.PushBack(new PropertyValue(mGridLayout));
+
+
+ mItemFactoryWrapper = new ItemFactoryWrapper();
+ mItemFactoryWrapper.GetNumberDelegate = GetNumberOfItems;
+ mItemFactoryWrapper.NewItemDelegate = NewItemView;
+
+ mItemView = new ItemView(mItemFactoryWrapper);
+ mItemView.PositionUsesPivotPoint = true;
+ mItemView.ParentOrigin = Position.ParentOriginCenter;
+ mItemView.PivotPoint = Position.PivotPointCenter;
+ window.Add(mItemView);
+
+ window.GetDefaultLayer().Behavior = Layer.LayerBehavior.Layer3D;
+
+ mItemView.Layout = mLayout;
+ mItemView.SetMinimumSwipeDistance(MIN_SWIPE_DISTANCE);
+ mItemView.SetMinimumSwipeSpeed(MIN_SWIPE_SPEED);
+
+ SetLayout((int)mCurrentLayout);
+ SetLayoutTitle();
+ SetLayoutImage();
+
+ mLongPressGestureDetector = new LongPressGestureDetector();
+ mLongPressGestureDetector.Attach(mItemView);
+ mLongPressGestureDetector.Detected += OnLongPressGestureDetected;
+ }
+
+ private void OnLongPressGestureDetected(object source, LongPressGestureDetector.DetectedEventArgs e)
+ {
+ switch (e.LongPressGesture.State)
+ {
+ case Gesture.StateType.Started:
+ {
+ Size2D windowSize = Window.Instance.Size;
+ ItemRange range = new ItemRange(0, 0);
+ mItemView.GetItemsRange(range);
+
+ uint item = (e.LongPressGesture.ScreenPoint.Y < 0.5f * (float)windowSize.Height) ? range.begin : range.end;
+
+ mItemView.ScrollToItem(item, SCROLL_TO_ITEM_ANIMATION_TIME);
+
+ break;
+ }
+ case Gesture.StateType.Finished:
+ {
+ PropertyMap attributes = new PropertyMap();
+ mItemView.DoAction("stopScrolling", attributes);
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ }
+
+ void SetLayout(int layoutId)
+ {
+ Window window = Window.Instance;
+ switch (mCurrentLayout)
+ {
+ case (int)AllImagesLayouts.SPIRAL_LAYOUT:
+ case (int)AllImagesLayouts.DEPTH_LAYOUT:
+ {
+ Window.Instance.GetDefaultLayer().Behavior = Layer.LayerBehavior.Layer3D;
+ break;
+ }
+ case (int)AllImagesLayouts.GRID_LAYOUT:
+ {
+ Window.Instance.GetDefaultLayer().Behavior = Layer.LayerBehavior.LayerUI;
+ break;
+ }
+ }
+
+ Size2D windowSize = Window.Instance.Size;
+
+ if (layoutId == (int)AllImagesLayouts.DEPTH_LAYOUT)
+ {
+ mDepthLayout.Insert((int)DefaultItemLayoutProperty.ITEM_SIZE, new PropertyValue(DepthLayoutItemSizeFunctionPortrait(800)));
+ mLayout.Clear();
+ mLayout.PushBack(new PropertyValue(mSpiralLayout));
+ mLayout.PushBack(new PropertyValue(mDepthLayout));
+ mLayout.PushBack(new PropertyValue(mGridLayout));
+ mItemView.Layout = mLayout;
+ }
+
+ // Enable anchoring for depth layout only
+ mItemView.SetAnchoring(layoutId == (int)AllImagesLayouts.DEPTH_LAYOUT);
+
+ // Activate the layout
+ mItemView.ActivateLayout((uint)layoutId, new Vector3(800, 800, 800), 0.0f);
+ }
+
+
+
+ public uint GetNumberOfItems()
+ {
+ return ITEM_COUNT;
+ }
+
+ public View NewItemView(uint itemId)
+ {
+ // Create an image view for this item
+ string imagePath = CommonResource.GetDaliResourcePath() + "ItemViewDemo/gallery/gallery-medium-";
+ uint id = itemId % 53;
+ imagePath += id.ToString();
+ imagePath += ".jpg";
+ PropertyMap propertyMap = new PropertyMap();
+ propertyMap.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ propertyMap.Insert(ImageVisualProperty.URL, new PropertyValue(imagePath));
+ propertyMap.Insert(ImageVisualProperty.FittingMode, new PropertyValue((int)VisualFittingModeType.FitKeepAspectRatio));
+ ImageView actor = new ImageView();
+ actor.Image = propertyMap;
+ actor.PositionZ = 0.0f;
+ actor.Position = new Position(1000.0f, 0, -1000.0f);
+
+ // Add a border image child actor
+ ImageView borderActor = new ImageView();
+ borderActor.ParentOrigin = ParentOrigin.Center;
+ borderActor.PivotPoint = PivotPoint.Center;
+ borderActor.PositionUsesPivotPoint = true;
+ borderActor.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
+ borderActor.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
+ borderActor.SetSizeModeFactor(new Vector3(2.0f * ITEM_BORDER_SIZE, 2.0f * ITEM_BORDER_SIZE, 0.0f));
+ borderActor.SetColorMode(ColorMode.UseParentColor);
+
+ PropertyMap borderProperty = new PropertyMap();
+ borderProperty.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Border));
+ borderProperty.Insert(BorderVisualProperty.Color, new PropertyValue(Color.White));
+ borderProperty.Insert(BorderVisualProperty.Size, new PropertyValue(ITEM_BORDER_SIZE));
+ borderProperty.Insert(BorderVisualProperty.AntiAliasing, new PropertyValue(true));
+ borderActor.Image = borderProperty;
+
+ actor.Add(borderActor);
+
+ Size spiralItemSize = new Size(30, 30, 0);
+ // Add a checkbox child actor; invisible until edit-mode is enabled
+ ImageView checkBox = new ImageView();
+ checkBox.Name = "CheckBox";
+ checkBox.SetColorMode(ColorMode.UseParentColor);
+ checkBox.ParentOrigin = ParentOrigin.TopRight;
+ checkBox.PivotPoint = PivotPoint.TopRight;
+ checkBox.Size = spiralItemSize;
+ checkBox.PositionZ = 0.1f;
+
+ PropertyMap solidColorProperty = new PropertyMap();
+ solidColorProperty.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color));
+ solidColorProperty.Insert(ColorVisualProperty.MixColor, new PropertyValue(new Color(0.0f, 0.0f, 0.0f, 0.6f)));
+ checkBox.Image = solidColorProperty;
+
+ if (Mode.MODE_REMOVE_MANY != mMode &&
+ Mode.MODE_INSERT_MANY != mMode &&
+ Mode.MODE_REPLACE_MANY != mMode)
+ {
+ checkBox.Hide();
+ }
+ borderActor.Add(checkBox);
+
+ ImageView tick = new ImageView(SELECTED_IMAGE);
+ tick.Name = "Tick";
+ tick.ParentOrigin = ParentOrigin.TopRight;
+ tick.PivotPoint = PivotPoint.TopRight;
+ tick.Size = spiralItemSize;
+ tick.Hide();
+ checkBox.Add(tick);
+
+ if (mTapDetector)
+ {
+ mTapDetector.Attach(actor);
+ }
+ return actor;
+ }
+
+ public void Deactivate()
+ {
+ if (mLayoutButton != null)
+ {
+ mLayoutButton.GetParent().Remove(mLayoutButton);
+ mLayoutButton.Dispose();
+ }
+
+ if (mEditButton != null)
+ {
+ mEditButton.GetParent().Remove(mEditButton);
+ mEditButton.Dispose();
+ }
+
+ if (mReplaceButton != null)
+ {
+ mReplaceButton.GetParent().Remove(mReplaceButton);
+ mReplaceButton.Dispose();
+ }
+
+ if (mInsertButton != null)
+ {
+ mInsertButton.GetParent().Remove(mInsertButton);
+ mInsertButton.Dispose();
+ }
+
+ if (mDeleteButton != null)
+ {
+ mDeleteButton.GetParent().Remove(mDeleteButton);
+ mDeleteButton.Dispose();
+ }
+
+ if (mTitle != null)
+ {
+ mTitle.GetParent().Remove(mTitle);
+ mTitle.Dispose();
+ }
+
+ if (mToolBarBackground != null)
+ {
+ mToolBarBackground.GetParent().Remove(mToolBarBackground);
+ mToolBarBackground.Dispose();
+ }
+
+ if (mItemView != null)
+ {
+ mItemView.GetParent().Remove(mItemView);
+ mItemView.Dispose();
+ }
+
+ if (mContentView != null)
+ {
+ Window.Instance.Remove(mContentView);
+ mContentView.Dispose();
+ }
+
+ if (mToolBarLayer != null)
+ {
+ Window.Instance.RemoveLayer(mToolBarLayer);
+ mToolBarLayer.Dispose();
+ }
+
+ Window.Instance.GetDefaultLayer().Behavior = Layer.LayerBehavior.Layer2D;
+ }
+
+ public void CreateContentView()
+ {
+ mContentView = new View();
+ mContentView.ParentOrigin = ParentOrigin.Center;
+ mContentView.PivotPoint = PivotPoint.Center;
+ mContentView.PositionUsesPivotPoint = true;
+ mContentView.WidthResizePolicy = ResizePolicyType.FillToParent;
+ mContentView.HeightResizePolicy = ResizePolicyType.FillToParent;
+ Window.Instance.Add(mContentView);
+
+ mContentView.LowerToBottom();
+ }
+
+
+ private void CreateToolBarLayer()
+ {
+ mToolBarLayer = new Layer();
+ mToolBarLayer.Name = "TOOLBAR";
+ mToolBarLayer.SetAnchorPoint(PivotPoint.TopCenter);
+ mToolBarLayer.SetParentOrigin(ParentOrigin.TopCenter);
+ mToolBarLayer.SetResizePolicy(ResizePolicyType.FillToParent, DimensionType.Width);
+ mToolBarLayer.SetSize(0, 80);
+ Window.Instance.AddLayer(mToolBarLayer);
+
+ mToolBarLayer.RaiseToTop();
+
+ mToolBarBackground = new ImageView();
+ mToolBarBackground.ParentOrigin = ParentOrigin.TopLeft;
+ mToolBarBackground.PivotPoint = PivotPoint.TopLeft;
+ mToolBarBackground.PositionUsesPivotPoint = true;
+ mToolBarBackground.WidthResizePolicy = ResizePolicyType.FillToParent;
+ mToolBarBackground.HeightResizePolicy = ResizePolicyType.FillToParent;
+ mToolBarBackground.ResourceUrl = TOOLBAR_IMAGE;
+ mToolBarLayer.Add(mToolBarBackground);
+
+ mTitle = new TextLabel();
+ mTitle.ParentOrigin = ParentOrigin.TopLeft;
+ mTitle.PivotPoint = PivotPoint.TopLeft;
+ mTitle.PositionUsesPivotPoint = true;
+ mTitle.PointSize = 10.0f;
+ mTitle.WidthResizePolicy = ResizePolicyType.FillToParent;
+ mTitle.HeightResizePolicy = ResizePolicyType.FillToParent;
+ mTitle.Text = APPLICATION_TITLE;
+ mTitle.VerticalAlignment = VerticalAlignment.Center;
+ mTitle.HorizontalAlignment = HorizontalAlignment.Center;
+ mToolBarLayer.Add(mTitle);
+ }
+
+ private void CreateLayoutButton()
+ {
+ mLayoutButton = new PushButton();
+ mLayoutButton.UnselectedBackgroundVisual = CreateImageVisual(SPIRAL_LAYOUT_IMAGE);
+ mLayoutButton.SelectedBackgroundVisual = CreateImageVisual(SPIRAL_LAYOUT_IMAGE_SELECTED);
+ mLayoutButton.Size2D = new Size2D(34, 34);
+ mLayoutButton.ParentOrigin = ParentOrigin.TopRight;
+ mLayoutButton.PivotPoint = PivotPoint.TopRight;
+ mLayoutButton.Position2D = new Position2D(0, 25);
+ mLayoutButton.PositionUsesPivotPoint = true;
+ mLayoutButton.LeaveRequired = true;
+ mLayoutButton.Clicked += (obj, e) =>
+ {
+ mCurrentLayout = (mCurrentLayout + 1) % (int)mItemView.GetLayoutCount();
+ ChangeLayout();
+
+ SetLayoutTitle();
+ SetLayoutImage();
+ return true;
+ };
+ mToolBarLayer.Add(mLayoutButton);
+ }
+
+ public void CreateEditButton()
+ {
+ mEditButton = new PushButton();
+ mEditButton.UnselectedBackgroundVisual = CreateImageVisual(EDIT_IMAGE);
+ mEditButton.SelectedBackgroundVisual = CreateImageVisual(EDIT_IMAGE_SELECTED);
+ mEditButton.Size2D = new Size2D(34, 34);
+ mEditButton.ParentOrigin = ParentOrigin.TopLeft;
+ mEditButton.PivotPoint = PivotPoint.TopLeft;
+ mEditButton.Position2D = new Position2D(5, 25);
+ mEditButton.PositionUsesPivotPoint = true;
+ mEditButton.LeaveRequired = true;
+ mEditButton.Clicked += (obj, e) =>
+ {
+ SwitchToNextMode();
+ return true;
+ };
+ mToolBarLayer.Add(mEditButton);
+ }
+
+ private void SetLayoutTitle()
+ {
+ if (Mode.MODE_NORMAL == mMode)
+ {
+ string title = APPLICATION_TITLE;
+ switch (mCurrentLayout)
+ {
+ case (int)AllImagesLayouts.SPIRAL_LAYOUT:
+ title = title + ": " + SPIRAL_LABEL;
+ break;
+ case (int)AllImagesLayouts.GRID_LAYOUT:
+ title = title + ": " + GRID_LABEL;
+ break;
+ case (int)AllImagesLayouts.DEPTH_LAYOUT:
+ title = title + ": " + DEPTH_LABEL;
+ break;
+ default:
+ break;
+ }
+ SetTitle(title);
+ }
+ }
+
+ private void CreateDeleteButton()
+ {
+ mDeleteButton = new PushButton();
+ mDeleteButton.ParentOrigin = ParentOrigin.BottomRight;
+ mDeleteButton.PivotPoint = PivotPoint.BottomRight;
+ mDeleteButton.PositionUsesPivotPoint = true;
+ mDeleteButton.Position2D = new Position2D(BUTTON_BORDER, BUTTON_BORDER);
+ mDeleteButton.DrawMode = DrawModeType.Overlay2D;
+ mDeleteButton.UnselectedBackgroundVisual = CreateImageVisual(DELETE_IMAGE);
+ mDeleteButton.SelectedBackgroundVisual = CreateImageVisual(DELETE_IMAGE_SELECTED);
+ mDeleteButton.Size2D = new Size2D(50, 50);
+ mDeleteButton.LeaveRequired = true;
+ mDeleteButton.Hide();
+ mDeleteButton.Clicked += (obj, e) =>
+ {
+ ItemIdContainer removeList = new ItemIdContainer();
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ if (child != null)
+ {
+ View tick = child.FindChildByName("Tick");
+
+ if (tick != null && tick.Visibility)
+ {
+ removeList.Add(mItemView.GetItemId(child));
+ }
+ }
+ }
+
+ if (removeList.Count != 0)
+ {
+ mItemView.RemoveItems(removeList, 0.5f);
+ }
+ return true;
+ };
+ Window.Instance.Add(mDeleteButton);
+ }
+
+ private void CreateInsertButton()
+ {
+ mInsertButton = new PushButton();
+ mInsertButton.ParentOrigin = ParentOrigin.BottomRight;
+ mInsertButton.PivotPoint = PivotPoint.BottomRight;
+ mInsertButton.PositionUsesPivotPoint = true;
+ mInsertButton.Position2D = new Position2D(BUTTON_BORDER, BUTTON_BORDER);
+ mInsertButton.DrawMode = DrawModeType.Overlay2D;
+ mInsertButton.UnselectedBackgroundVisual = CreateImageVisual(INSERT_IMAGE);
+ mInsertButton.SelectedBackgroundVisual = CreateImageVisual(INSERT_IMAGE_SELECTED);
+ mInsertButton.Size2D = new Size2D(50, 50);
+ mInsertButton.LeaveRequired = true;
+ mInsertButton.Hide();
+ mInsertButton.Clicked += (obj, e) =>
+ {
+ ItemContainer insertList = new ItemContainer();
+ Random random = new Random();
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ if (child != null)
+ {
+ View tick = child.FindChildByName("Tick");
+
+ if (tick != null && tick.Visibility)
+ {
+ insertList.Add(new Item(mItemView.GetItemId(child), NewItemView((uint)random.Next(52))));
+ }
+ }
+ }
+ if (insertList.Count != 0)
+ {
+ mItemView.InsertItems(insertList, 0.5f);
+ }
+ return true;
+ };
+ Window.Instance.Add(mInsertButton);
+ }
+
+ private void CreateReplaceButton()
+ {
+ mReplaceButton = new PushButton();
+ mReplaceButton.ParentOrigin = ParentOrigin.BottomRight;
+ mReplaceButton.PivotPoint = PivotPoint.BottomRight;
+ mReplaceButton.PositionUsesPivotPoint = true;
+ mReplaceButton.Position2D = new Position2D(BUTTON_BORDER, BUTTON_BORDER);
+ mReplaceButton.DrawMode = DrawModeType.Overlay2D;
+ mReplaceButton.UnselectedBackgroundVisual = CreateImageVisual(REPLACE_IMAGE);
+ mReplaceButton.SelectedBackgroundVisual = CreateImageVisual(REPLACE_IMAGE_SELECTED);
+ mReplaceButton.Size2D = new Size2D(50, 50);
+ mReplaceButton.LeaveRequired = true;
+ mReplaceButton.Hide();
+ mReplaceButton.Clicked += (obj, e) =>
+ {
+ ItemContainer replaceList = new ItemContainer();
+ Random random = new Random();
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ if (child != null)
+ {
+ View tick = child.FindChildByName("Tick");
+
+ if (tick != null && tick.Visibility)
+ {
+ replaceList.Add(new Item(mItemView.GetItemId(child), NewItemView((uint)random.Next(52))));
+ }
+ }
+ }
+
+ if (replaceList.Count != 0)
+ {
+ mItemView.ReplaceItems(replaceList, 0.5f);
+ }
+ return true;
+ };
+ Window.Instance.Add(mReplaceButton);
+ }
+
+ void SwitchToNextMode()
+ {
+ switch (mMode)
+ {
+ case Mode.MODE_REMOVE:
+ {
+ ExitRemoveMode();
+ mMode = Mode.MODE_REMOVE_MANY;
+ EnterRemoveManyMode();
+ break;
+ }
+
+ case Mode.MODE_REMOVE_MANY:
+ {
+ ExitRemoveManyMode();
+ mMode = Mode.MODE_INSERT;
+ EnterInsertMode();
+ break;
+ }
+
+ case Mode.MODE_INSERT:
+ {
+ ExitInsertMode();
+ mMode = Mode.MODE_INSERT_MANY;
+ EnterInsertManyMode();
+ break;
+ }
+
+ case Mode.MODE_INSERT_MANY:
+ {
+ ExitInsertManyMode();
+ mMode = Mode.MODE_REPLACE;
+ EnterReplaceMode();
+ break;
+ }
+
+ case Mode.MODE_REPLACE:
+ {
+ ExitReplaceMode();
+ mMode = Mode.MODE_REPLACE_MANY;
+ EnterReplaceManyMode();
+ break;
+ }
+
+ case Mode.MODE_REPLACE_MANY:
+ {
+ ExitReplaceManyMode();
+ mMode = Mode.MODE_NORMAL;
+ SetLayoutTitle();
+ break;
+ }
+
+ case Mode.MODE_NORMAL:
+ default:
+ {
+ mMode = Mode.MODE_REMOVE;
+ EnterRemoveMode();
+ break;
+ }
+ }
+ }
+
+ void EnterRemoveMode()
+ {
+ SetTitle("Edit: Remove");
+ mTapDetector = new TapGestureDetector();
+
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ if (mItemView.GetChildAt(i) != null)
+ {
+ mTapDetector.Attach(mItemView.GetChildAt(i));
+ }
+ }
+
+ mTapDetector.Detected += (obj, e) =>
+ {
+ View item = e.View;
+ if (item != null)
+ {
+ mItemView.RemoveItem(mItemView.GetItemId(item), 0.5f);
+ }
+ };
+ }
+
+ void ExitRemoveMode()
+ {
+ mTapDetector.DetachAll();
+ mTapDetector.Reset();
+ }
+
+ void EnterRemoveManyMode()
+ {
+ SetTitle("Edit: Remove Many");
+ mDeleteButton.Show();
+
+ mTapDetector = new TapGestureDetector();
+
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ if (child != null)
+ {
+ View box = child.FindChildByName("CheckBox");
+ if (box)
+ {
+ mTapDetector.Attach(child);
+ box.Show();
+ }
+ }
+ }
+
+ mTapDetector.Detected += (obj, e) =>
+ {
+ View view = e.View;
+ if (view != null)
+ {
+ Console.WriteLine("haha");
+ }
+ else
+ {
+ Console.WriteLine("hehe");
+ }
+ View tick = view.FindChildByName("Tick");
+ if (tick)
+ {
+ if (tick.Visibility)
+ {
+ tick.Hide();
+ }
+ else
+ {
+ tick.Show();
+ }
+ }
+ };
+ }
+
+ void ExitRemoveManyMode()
+ {
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ if (child != null)
+ {
+ View box = child.FindChildByName("CheckBox");
+
+ if (box)
+ {
+ box.Hide();
+
+ View tick = box.FindChildByName("Tick");
+ if (tick)
+ {
+ tick.Hide();
+ }
+ }
+ }
+ }
+ mTapDetector.Reset();
+ mDeleteButton.Hide();
+ }
+
+ void EnterInsertMode()
+ {
+ SetTitle("Edit: Insert");
+ mTapDetector = new TapGestureDetector();
+
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ if (mItemView.GetChildAt(i) != null)
+ {
+ mTapDetector.Attach(mItemView.GetChildAt(i));
+ }
+
+ }
+ mTapDetector.Detected += (obj, e) =>
+ {
+ if (e.View != null)
+ {
+ uint id = mItemView.GetItemId(e.View);
+ Random random = new Random();
+
+ View newActor = NewItemView((uint)random.Next(52));
+
+ mItemView.InsertItem(new Item(id, newActor), 0.5f);
+ }
+ else
+ {
+ Tizen.Log.Fatal("NUI", "e.View is null when EnterInsertMode!");
+ }
+ };
+ }
+
+ void ExitInsertMode()
+ {
+ mTapDetector.DetachAll();
+ mTapDetector.Reset();
+ }
+ void EnterInsertManyMode()
+ {
+ SetTitle("Edit: Insert Many");
+ mInsertButton.Show();
+
+ mTapDetector = new TapGestureDetector();
+
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ if (child != null)
+ {
+ View box = child.FindChildByName("CheckBox");
+
+ if (box)
+ {
+ mTapDetector.Attach(child);
+ box.Show();
+ }
+ }
+ }
+ mTapDetector.Detected += (obj, e) =>
+ {
+ View tick = (e.View).FindChildByName("Tick");
+ if (tick)
+ {
+ if (tick.Visibility)
+ {
+ tick.Hide();
+ }
+ else
+ {
+ tick.Show();
+ }
+ }
+ };
+ }
+
+ void ExitInsertManyMode()
+ {
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ if (child != null)
+ {
+ View box = child.FindChildByName("CheckBox");
+
+ if (box)
+ {
+ box.Hide();
+
+ View tick = box.FindChildByName("Tick");
+ if (tick)
+ {
+ tick.Hide();
+ }
+ }
+ }
+ }
+ mTapDetector.Reset();
+ mInsertButton.Hide();
+ }
+
+ void EnterReplaceMode()
+ {
+ SetTitle("Edit: Replace");
+ mTapDetector = new TapGestureDetector();
+
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ if (mItemView.GetChildAt(i) != null)
+ {
+ mTapDetector.Attach(mItemView.GetChildAt(i));
+ }
+ }
+
+ mTapDetector.Detected += (obj, e) =>
+ {
+ Random random = new Random();
+ mItemView.ReplaceItem(new Item(mItemView.GetItemId(e.View), NewItemView((uint)random.Next(52))), 0.5f);
+ };
+ }
+
+ void ExitReplaceMode()
+ {
+ mTapDetector.DetachAll();
+ mTapDetector.Reset();
+ }
+
+
+ void EnterReplaceManyMode()
+ {
+ SetTitle("Edit: Replace Many");
+ mReplaceButton.Show();
+
+ mTapDetector = new TapGestureDetector();
+
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ View box = child.FindChildByName("CheckBox");
+
+ if (box)
+ {
+ mTapDetector.Attach(child);
+ box.Show();
+ }
+ }
+
+ mTapDetector.Detected += (obj, e) =>
+ {
+ View tick = (e.View).FindChildByName("Tick");
+ if (tick)
+ {
+ if (tick.Visibility)
+ {
+ tick.Hide();
+ }
+ else
+ {
+ tick.Show();
+ }
+ }
+ };
+ }
+ void ExitReplaceManyMode()
+ {
+ for (uint i = 0; i < mItemView.GetChildCount(); ++i)
+ {
+ View child = mItemView.GetChildAt(i);
+ View box = child.FindChildByName("CheckBox");
+
+ if (box)
+ {
+ box.Hide();
+
+ View tick = box.FindChildByName("Tick");
+ if (tick)
+ {
+ tick.Hide();
+ }
+ }
+ }
+ mTapDetector.Reset();
+ mReplaceButton.Hide();
+ }
+
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Samples
+{
+ public enum AllImagesLayouts
+ {
+ SPIRAL_LAYOUT = 0,
+ DEPTH_LAYOUT,
+ GRID_LAYOUT,
+
+ NUMBER_OF_LAYOUTS
+ };
+
+ public enum Mode
+ {
+ MODE_NORMAL,
+ MODE_REMOVE,
+ MODE_REMOVE_MANY,
+ MODE_INSERT,
+ MODE_INSERT_MANY,
+ MODE_REPLACE,
+ MODE_REPLACE_MANY,
+ MODE_LAST
+ };
+}
--- /dev/null
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class LoadingSample : IExample
+ {
+ private TextLabel board1, board2, board;
+ private Button button1, button2, button3, button4;
+ private Loading loading1_1, loading2_1; //1-null para 2-attributes; X_1-color; X_2 image track
+ private View root;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ };
+
+ CreateBoardAndButtons();
+ string[] imageArray = new string[36];
+ for (int i=0; i<36; i++)
+ {
+ if (i < 10)
+ {
+ imageArray[i] = CommonResource.GetFHResourcePath() + "9. Controller/Loading Sequence_Native/loading_0" + i + ".png";
+ }
+ else
+ {
+ imageArray[i] = CommonResource.GetFHResourcePath() + "9. Controller/Loading Sequence_Native/loading_" + i + ".png";
+ }
+ }
+
+ loading1_1 = new Loading();
+ loading1_1.Position2D = new Position2D(100, 350);
+ loading1_1.Size2D = new Size2D(100, 100);
+
+ loading1_1.Images = imageArray;
+ root.Add(loading1_1);
+
+ LoadingStyle style = new LoadingStyle
+ {
+ Images = imageArray
+ };
+
+ loading2_1 = new Loading(style);
+ loading2_1.Position2D = new Position2D(500, 350);
+ loading2_1.Size2D = new Size2D(100, 100);
+ root.Add(loading2_1);
+
+ window.Add(root);
+
+ FocusManager.Instance.SetCurrentFocusView(button1);
+ }
+
+ void CreateBoardAndButtons()
+ {
+ board = new TextLabel();
+ board.Size2D = new Size2D(1000, 100);
+ board.Position2D = new Position2D(430, 900);
+ board.PointSize = 30;
+ board.HorizontalAlignment = HorizontalAlignment.Center;
+ board.VerticalAlignment = VerticalAlignment.Center;
+ board.BackgroundColor = Color.Magenta;
+ board.Text = "log pad";
+ root.Add(board);
+
+ board1 = new TextLabel();
+ board1.Size2D = new Size2D(300, 70);
+ board1.Position2D = new Position2D(50, 200);
+ board1.PointSize = 20;
+ board1.HorizontalAlignment = HorizontalAlignment.Center;
+ board1.VerticalAlignment = VerticalAlignment.Center;
+ board1.BackgroundColor = Color.Magenta;
+ board1.Text = "NULL parameter construction";
+ root.Add(board1);
+
+ board2 = new TextLabel();
+ board2.Size2D = new Size2D(300, 70);
+ board2.Position2D = new Position2D(400, 200);
+ board2.PointSize = 20;
+ board2.HorizontalAlignment = HorizontalAlignment.Center;
+ board2.VerticalAlignment = VerticalAlignment.Center;
+ board2.BackgroundColor = Color.Magenta;
+ board2.Text = "Attribute parameter construction";
+ root.Add(board2);
+
+ button1 = new Button();
+ button1.BackgroundColor = Color.Green;
+ button1.Position2D = new Position2D(80, 600);
+ button1.Size2D = new Size2D(100, 50);
+ button1.Style.Text.Text = "FPS++";
+ root.Add(button1);
+ button1.Focusable = true;
+ button1.ClickEvent += Loading1FPSAdd;
+ button1.FocusGained += FocusGained;
+ button1.FocusLost += FocusLost;
+
+ button2 = new Button();
+ button2.BackgroundColor = Color.Green;
+ button2.Position2D = new Position2D(200, 600);
+ button2.Size2D = new Size2D(100, 50);
+ button2.Style.Text.Text = "FPS--";
+ root.Add(button2);
+ button2.Focusable = true;
+ button2.ClickEvent += Loading1FPSMinus;
+ button2.FocusGained += FocusGained;
+ button2.FocusLost += FocusLost;
+
+ button1.RightFocusableView = button2;
+ button2.LeftFocusableView = button1;
+
+ button3 = new Button();
+ button3.BackgroundColor = Color.Green;
+ button3.Position2D = new Position2D(450, 600);
+ button3.Size2D = new Size2D(180, 50);
+ button3.Style.Text.Text = "Normal Loading";
+ root.Add(button3);
+ }
+
+ private void Loading1FPSAdd(object sender, global::System.EventArgs e)
+ {
+ loading1_1.FrameRate += 1;
+ board.Text = "loading1_1 FPS: "+loading1_1.FrameRate.ToString();
+ }
+
+ private void Loading1FPSMinus(object sender, global::System.EventArgs e)
+ {
+ loading1_1.FrameRate -= 1;
+ board.Text = "loading1_1 FPS: " + loading1_1.FrameRate.ToString();
+ }
+
+ private void FocusLost(object sender, global::System.EventArgs e)
+ {
+ View view = sender as View;
+ view.Scale = new Vector3(1.2f, 1.2f, 1.0f);
+ }
+
+ private void FocusGained(object sender, global::System.EventArgs e)
+ {
+ View view = sender as View;
+ view.Scale = new Vector3(1.0f, 1.0f, 1.0f);
+ }
+
+ public void Deactivate()
+ {
+ if (board != null)
+ {
+ root.Remove(board);
+ board.Dispose();
+ board = null;
+ }
+ if (board1 != null)
+ {
+ root.Remove(board1);
+ board1.Dispose();
+ board1 = null;
+ }
+ if (board2 != null)
+ {
+ root.Remove(board2);
+ board2.Dispose();
+ board2 = null;
+ }
+ if (button1 != null)
+ {
+ button1.ClickEvent -= Loading1FPSAdd;
+ button1.FocusGained -= FocusGained;
+ button1.FocusLost -= FocusLost;
+ root.Remove(button1);
+ button1.Dispose();
+ button1 = null;
+ }
+ if (button2 != null)
+ {
+ button2.ClickEvent -= Loading1FPSMinus;
+ button2.FocusGained -= FocusGained;
+ button2.FocusLost -= FocusLost;
+ root.Remove(button2);
+ button2.Dispose();
+ button2 = null;
+ }
+ if (button3 != null)
+ {
+ root.Remove(button3);
+ button3.Dispose();
+ button3 = null;
+ }
+ if (loading1_1 != null)
+ {
+ root.Remove(loading1_1);
+ loading1_1.Dispose();
+ loading1_1 = null;
+ }
+ if (loading2_1 != null)
+ {
+ root.Remove(loading2_1);
+ loading2_1.Dispose();
+ loading2_1 = null;
+ }
+ if (root != null)
+ {
+ Window.Instance.Remove(root);
+ root.Dispose();
+ root = null;
+ }
+ }
+ }
+}
--- /dev/null
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class LottieAnimationTest : IExample
+ {
+ LottieAnimationView lav;
+ public void Activate()
+ {
+ lav = new LottieAnimationView();
+ lav.URL = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "a.json";
+ lav.LoopCount = -1;
+ lav.BackgroundColor = Color.White;
+ Window.Instance.GetDefaultLayer().Add(lav);
+ lav.Play();
+ }
+ public void Deactivate()
+ {
+ Window.Instance.GetDefaultLayer().Remove(lav);
+ }
+ }
+}
--- /dev/null
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Samples
+{
+ public class PaginationSample : IExample
+ {
+ private Pagination pagination1;
+ private Pagination pagination2;
+
+ private readonly int PAGE_COUNT = 5;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ ///////////////////////////////////////////////Create by Properties//////////////////////////////////////////////////////////
+ pagination1 = new Pagination();
+ pagination1.Name = "Pagination1";
+ pagination1.Position2D = new Position2D(500, 450);
+ pagination1.Size2D = new Size2D(400, 30);
+ pagination1.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f);
+ pagination1.IndicatorSize = new Size(26, 26);
+ pagination1.IndicatorImageURL = new Selector<string>()
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_nor.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/pagination_ic_sel.png",
+ };
+ pagination1.IndicatorSpacing = 8;
+ pagination1.IndicatorCount = PAGE_COUNT;
+ pagination1.SelectedIndex = 0;
+ window.Add(pagination1);
+
+ ///////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ PaginationStyle style = new PaginationStyle();
+ style.IndicatorSize = new Size(15, 15);
+ style.IndicatorImageURL = new Selector<string>()
+ {
+ Normal = CommonResource.GetTVResourcePath() + "component/c_pagination/c_paganation_medium_dot_normal.png",
+ Selected = CommonResource.GetTVResourcePath() + "component/c_pagination/c_paganation_medium_dot_focus.png",
+ };
+ style.IndicatorSpacing = 14;
+ pagination2 = new Pagination(style);
+ pagination2.Name = "Pagination2";
+ pagination2.Position2D = new Position2D(500, 500);
+ pagination2.Size2D = new Size2D(400, 30);
+ pagination2.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.6f);
+ pagination2.IndicatorCount = PAGE_COUNT;
+ pagination2.SelectedIndex = 0;
+ window.Add(pagination2);
+
+ window.KeyEvent += Window_KeyEvent;
+ }
+
+ private void Window_KeyEvent(object sender, Window.KeyEventArgs e)
+ {
+ if (e.Key.State == Key.StateType.Down)
+ {
+ if (e.Key.KeyPressedName == "Left")
+ {
+ if (pagination1.SelectedIndex > 0)
+ {
+ pagination1.SelectedIndex = pagination1.SelectedIndex - 1;
+ }
+ if (pagination2.SelectedIndex > 0)
+ {
+ pagination2.SelectedIndex = pagination2.SelectedIndex - 1;
+ }
+ }
+ else if (e.Key.KeyPressedName == "Right")
+ {
+ if (pagination1.SelectedIndex < pagination1.IndicatorCount - 1)
+ {
+ pagination1.SelectedIndex = pagination1.SelectedIndex + 1;
+ }
+ if (pagination2.SelectedIndex < pagination2.IndicatorCount - 1)
+ {
+ pagination2.SelectedIndex = pagination2.SelectedIndex + 1;
+ }
+ }
+ }
+ }
+
+ public void Deactivate()
+ {
+ Window window = Window.Instance;
+ window.KeyEvent -= Window_KeyEvent;
+ window.Remove(pagination1);
+ window.Remove(pagination2);
+
+ pagination1.Dispose();
+ pagination2.Dispose();
+ }
+ }
+}
--- /dev/null
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class PopupSample : IExample
+ {
+ private View root;
+
+ private TextLabel[] createText = new TextLabel[2];
+
+ private Popup popup = null;
+ private Popup popup2 = null;
+ private TextLabel contentText = null;
+ private TextLabel contentText2 = null;
+ private int index = 0;
+ private int index2 = 0;
+ private Button button = null;
+
+ private static string[] buttonStyles = new string[]
+ {
+ "UtilityPopupButton",
+ "FamilyPopupButton",
+ "FoodPopupButton",
+ "KitchenPopupButton",
+ };
+ private static Color[] color = new Color[]
+ {
+ new Color(0.05f, 0.63f, 0.9f, 1),//#ff0ea1e6
+ new Color(0.14f, 0.77f, 0.28f, 1),//#ff24c447
+ new Color(0.75f, 0.46f, 0.06f, 1),//#ffec7510
+ new Color(0.59f, 0.38f, 0.85f, 1),//#ff9762d9
+ };
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ BackgroundColor = Color.White,
+ };
+ window.Add(root);
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ createText[0] = new TextLabel();
+ createText[0].Text = "Create Popup just by properties";
+ createText[0].Size2D = new Size2D(500, 100);
+ createText[0].Position2D = new Position2D(500, 50);
+ root.Add(createText[0]);
+
+ popup = new Popup();
+ popup.MinimumSize = new Size2D(1032, 184);
+ popup.Size = new Size(1032, 400);
+ popup.Position = new Position(200, 100);
+
+ // Title
+ popup.Style.Title.PointSize = 25;
+ popup.Style.Title.SizeHeight = 68;
+ popup.Style.Title.HorizontalAlignment = HorizontalAlignment.Begin;
+ popup.Style.Title.Position = new Position(64, 52);
+ popup.Style.Title.Text = "Popup Title";
+
+ // Shadow and background
+ popup.Style.ShadowExtents = new Extents(24, 24, 24, 24);
+ popup.ShadowImage = CommonResource.GetFHResourcePath() + "11. Popup/popup_background_shadow.png";
+ popup.ShadowImageBorder = new Rectangle(0, 0, 105, 105);
+ popup.BackgroundImage = CommonResource.GetFHResourcePath() + "11. Popup/popup_background.png";
+ popup.BackgroundImageBorder = new Rectangle(0, 0, 81, 81);
+
+ // Buttons
+ popup.AddButton("Yes");
+ popup.AddButton("Exit");
+ popup.ButtonBackground = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_normal.png";
+ popup.ButtonBackgroundBorder = new Rectangle(5, 5, 5, 5);
+ popup.ButtonOverLayBackgroundColorSelector = new Selector<Color>
+ {
+ Normal = new Color(1.0f, 1.0f, 1.0f, 1.0f),
+ Pressed = new Color(0.0f, 0.0f, 0.0f, 0.1f),
+ Selected = new Color(1.0f, 1.0f, 1.0f, 1.0f),
+ };
+ popup.ButtonShadow = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png";
+ popup.ButtonShadowBorder = new Rectangle(5, 5, 5, 5);
+ popup.ButtonTextColor = color[0];
+ popup.ButtonHeight = 132;
+ popup.PopupButtonClickEvent += PopupButtonClickedEvent;
+ popup.LayoutDirectionChanged += PopupLayoutDirectionChanged;
+ popup.Post(window);
+
+ contentText = new TextLabel();
+ contentText.Size2D = new Size2D(904, 100);
+ contentText.PointSize = 20;
+ contentText.HorizontalAlignment = HorizontalAlignment.Begin;
+ contentText.VerticalAlignment = VerticalAlignment.Center;
+ contentText.Text = "Popup ButtonStyle is " + buttonStyles[index];
+ contentText.TextColor = new Color(0,0,222,1);
+ popup.AddContentText(contentText);
+
+ ///////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ createText[1] = new TextLabel();
+ createText[1].Text = "Create Popup just by Attributes";
+ createText[1].Size2D = new Size2D(500, 100);
+ createText[1].Position2D = new Position2D(500, 550);
+ root.Add(createText[1]);
+
+ PopupStyle attrs = new PopupStyle
+ {
+ MinimumSize = new Size2D(1032, 184),
+ ShadowExtents = new Extents(24, 24, 24, 24),
+ BackgroundImage = new Selector<string> { All = CommonResource.GetFHResourcePath() + "11. Popup/popup_background.png" },
+ BackgroundImageBorder = new Selector<Rectangle> { All = new Rectangle(0, 0, 81, 81) },
+ Shadow = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "11. Popup/popup_background_shadow.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(0, 0, 105, 105) }
+ },
+ Title = new TextLabelStyle
+ {
+ PointSize = new Selector<float?> { All = 25 },
+ TextColor = new Selector<Color> { All = Color.Black },
+ Size = new Size(0, 68),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
+ PivotPoint = Tizen.NUI.PivotPoint.TopLeft,
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ Position = new Position(64, 52),
+ Text = new Selector<string> { All = "Popup Title" },
+ },
+ Buttons = new ButtonStyle
+ {
+ PositionUsesPivotPoint = true,
+ ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
+ PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
+ BackgroundImage = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_normal.png" },
+ BackgroundImageBorder = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) },
+ Shadow = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string> { All = CommonResource.GetFHResourcePath() + "3. Button/rectangle_btn_shadow.png" },
+ Border = new Selector<Rectangle> { All = new Rectangle(5, 5, 5, 5) }
+ },
+ Overlay = new ImageViewStyle
+ {
+ PositionUsesPivotPoint = true,
+ ParentOrigin = Tizen.NUI.ParentOrigin.Center,
+ PivotPoint = Tizen.NUI.PivotPoint.Center,
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ BackgroundColor = new Selector<Color>
+ {
+ Normal = new Color(1.0f, 1.0f, 1.0f, 1.0f),
+ Pressed = new Color(0.0f, 0.0f, 0.0f, 0.1f),
+ Selected = new Color(1.0f, 1.0f, 1.0f, 1.0f),
+ }
+ },
+ Text = new TextLabelStyle
+ {
+ PositionUsesPivotPoint = true,
+ ParentOrigin = Tizen.NUI.ParentOrigin.Center,
+ PivotPoint = Tizen.NUI.PivotPoint.Center,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center,
+ TextColor = new Selector<Color> { All = color[index2] },
+ },
+ },
+ };
+
+ popup2 = new Popup(attrs);
+ popup2.Size = new Size(1032, 400);
+ popup2.Position = new Position(200, 600);
+ popup2.AddButton("Yes");
+ popup2.AddButton("Exit");
+ popup2.ButtonHeight = 132;
+ popup2.PopupButtonClickEvent += PopupButtonClickedEvent;
+ popup2.LayoutDirectionChanged += Popup2LayoutDirectionChanged;
+ popup2.Post(window);
+
+ contentText2 = new TextLabel();
+ contentText2.Size2D = new Size2D(904, 100);
+ contentText2.PointSize = 20;
+ contentText2.HorizontalAlignment = HorizontalAlignment.Begin;
+ contentText2.VerticalAlignment = VerticalAlignment.Center;
+ contentText2.Text = "Popup2 ButtonStyle is " + buttonStyles[index];
+ popup2.ContentView.Add(contentText2);
+
+ button = new Button();
+ button.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png";
+ button.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5);
+ button.Size2D = new Size2D(580, 80);
+ button.Position2D = new Position2D(1300, 500);
+ button.Style.Text.Text = "LayoutDirection is left to right";
+ button.ClickEvent += ButtonClickEvent;
+ root.Add(button);
+ }
+
+ private void Popup2LayoutDirectionChanged(object sender, View.LayoutDirectionChangedEventArgs e)
+ {
+ if (contentText2.HorizontalAlignment == HorizontalAlignment.Begin)
+ {
+ contentText2.HorizontalAlignment = HorizontalAlignment.End;
+ }
+ else if (contentText2.HorizontalAlignment == HorizontalAlignment.End)
+ {
+ contentText2.HorizontalAlignment = HorizontalAlignment.Begin;
+ }
+ }
+
+ private void PopupLayoutDirectionChanged(object sender, View.LayoutDirectionChangedEventArgs e)
+ {
+ if (contentText.HorizontalAlignment == HorizontalAlignment.Begin)
+ {
+ contentText.HorizontalAlignment = HorizontalAlignment.End;
+ }
+ else if (contentText.HorizontalAlignment == HorizontalAlignment.End)
+ {
+ contentText.HorizontalAlignment = HorizontalAlignment.Begin;
+ }
+ }
+
+ private void PopupButtonClickedEvent(object sender, Popup.ButtonClickEventArgs e)
+ {
+ Popup obj = sender as Popup;
+ if (obj != null && e.ButtonIndex == 0)
+ {
+ if(obj == popup)
+ {
+ index++;
+ index = index % buttonStyles.Length;
+ obj.ButtonTextColor = color[index];
+ contentText.Text = "Popup ButtonStyle is " + buttonStyles[index];
+ }
+ else
+ {
+ index2++;
+ index2 = index2 % buttonStyles.Length;
+ obj.ButtonTextColor = color[index2];
+ contentText2.Text = "Popup2 ButtonStyle is " + buttonStyles[index2];
+ }
+ }
+ }
+
+ private void ButtonClickEvent(object sender, Button.ClickEventArgs e)
+ {
+ if (popup.LayoutDirection == ViewLayoutDirectionType.LTR)
+ {
+ popup.LayoutDirection = ViewLayoutDirectionType.RTL;
+ popup2.LayoutDirection = ViewLayoutDirectionType.RTL;
+ button.Style.Text.Text = "LayoutDirection is right to left";
+ }
+ else
+ {
+ popup.LayoutDirection = ViewLayoutDirectionType.LTR;
+ popup2.LayoutDirection = ViewLayoutDirectionType.LTR;
+ button.Style.Text.Text = "LayoutDirection is left to right";
+ }
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ if (popup != null)
+ {
+ if (contentText != null)
+ {
+ popup.ContentView.Remove(contentText);
+ contentText.Dispose();
+ contentText = null;
+ }
+
+ root.Remove(popup);
+ popup.Dispose();
+ popup = null;
+ }
+
+ if (popup2 != null)
+ {
+ if (contentText2 != null)
+ {
+ popup2.ContentView.Remove(contentText2);
+ contentText2.Dispose();
+ contentText2 = null;
+ }
+
+ root.Remove(popup2);
+ popup2.Dispose();
+ popup2 = null;
+ }
+
+ if (createText[0] != null)
+ {
+ root.Remove(createText[0]);
+ createText[0].Dispose();
+ createText[0] = null;
+ }
+
+ if (createText[1] != null)
+ {
+ root.Remove(createText[1]);
+ createText[1].Dispose();
+ createText[1] = null;
+ }
+
+ if (button != null)
+ {
+ root.Remove(button);
+ button.Dispose();
+ button = null;
+ }
+
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using Tizen.NUI;
+
+namespace Tizen.NUI.Samples
+{
+ public class ProgressSample : IExample
+ {
+ private TextLabel board1, board2, board;
+ private Button button1, button2, button3, button4, button5;
+ int status = 0;
+ private Progress progressBar1_1, progressBar1_2, progressBar2_1, progressBar2_2; //1-null para 2-attributes; X_1-color; X_2 image track
+ private View root;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ };
+
+ CreateBoardAndButtons();
+
+ //button1.ClickEvent += bar1Add;
+ //button2.ClickEvent += bar1Minus;
+ //button3.ClickEvent += circle1Add;
+ //button4.ClickEvent += circle1Minus;
+ //button5.ClickEvent += circleStatusChanged;
+
+ progressBar1_1 = new Progress();
+ progressBar1_1.Position2D = new Position2D(80, 350);
+ progressBar1_1.Size2D = new Size2D(140, 4);
+ progressBar1_1.MaxValue = 100;
+ progressBar1_1.MinValue = 0;
+ progressBar1_1.CurrentValue = 45;
+ progressBar1_1.Style.Track.BackgroundColor = Color.Green;
+ progressBar1_1.Style.Progress.BackgroundColor = Color.Black;
+ root.Add(progressBar1_1);
+
+ progressBar1_2 = new Progress();
+ progressBar1_2.Position2D = new Position2D(80, 420);
+ progressBar1_2.Size2D = new Size2D(140, 4);
+ progressBar1_2.MaxValue = 100;
+ progressBar1_2.MinValue = 0;
+ progressBar1_2.CurrentValue = 15;
+ progressBar1_2.Style.Track.BackgroundColor = Color.Green;
+ progressBar1_2.Style.Progress.BackgroundColor = Color.Black;
+
+ root.Add(progressBar1_2);
+
+ ProgressStyle attr = new ProgressStyle
+ {
+ Track = new ImageViewStyle
+ {
+ BackgroundColor = new Selector<Color>
+ {
+ All = Color.Cyan,
+ }
+ },
+ Progress = new ImageViewStyle
+ {
+ BackgroundColor = new Selector<Color>
+ {
+ All = Color.Black,
+ }
+ },
+
+ };
+
+ progressBar2_1 = new Progress(attr);
+ progressBar2_1.Position2D = new Position2D(380, 350);
+ progressBar2_1.Size2D = new Size2D(140, 4);
+ progressBar2_1.MaxValue = 100;
+ progressBar2_1.MinValue = 0;
+ progressBar2_1.CurrentValue = 30;
+ root.Add(progressBar2_1);
+
+ //progressBar2_2 = new Progress(att);
+ //progressBar2_2.Position2D = new Position2D(80, 560);
+ //progressBar2_2.Size2D = new Size2D(140, 4);
+ //progressBar2_2.MaxValue = 100;
+ //progressBar2_2.MinValue = 0;
+ //progressBar2_2.CurrentValue = 75;
+ //progressBar2_2.UpdateValue();
+ //progressBar2_2.Direction = Progress.DirectionType.Horizontal;
+ //root.Add(progressBar2_2);
+
+ board.UpFocusableView = button1;
+ window.Add(root);
+ FocusManager.Instance.SetCurrentFocusView(button1);
+
+ }
+
+ void CreateBoardAndButtons()
+ {
+ board = new TextLabel();
+ board.Size2D = new Size2D(1000, 100);
+ board.Position2D = new Position2D(430, 900);
+ board.PointSize = 30;
+ board.HorizontalAlignment = HorizontalAlignment.Center;
+ board.VerticalAlignment = VerticalAlignment.Center;
+ board.BackgroundColor = Color.Magenta;
+ board.Text = "log pad";
+ root.Add(board);
+ board.Focusable = true;
+ board.FocusGained += Board_FocusGained;
+ board.FocusLost += Board_FocusLost;
+
+ board1 = new TextLabel();
+ board1.Size2D = new Size2D(300, 70);
+ board1.Position2D = new Position2D(50, 200);
+ board1.PointSize = 20;
+ board1.HorizontalAlignment = HorizontalAlignment.Center;
+ board1.VerticalAlignment = VerticalAlignment.Center;
+ board1.BackgroundColor = Color.Magenta;
+ board1.Text = "NULL parameter construction";
+ root.Add(board1);
+ board1.Focusable = true;
+ board1.FocusGained += Board_FocusGained;
+ board1.FocusLost += Board_FocusLost;
+
+ board2 = new TextLabel();
+ board2.Size2D = new Size2D(300, 70);
+ board2.Position2D = new Position2D(400, 200);
+ board2.PointSize = 20;
+ board2.HorizontalAlignment = HorizontalAlignment.Center;
+ board2.VerticalAlignment = VerticalAlignment.Center;
+ board2.BackgroundColor = Color.Magenta;
+ board2.Text = "Attribute construction";
+ root.Add(board2);
+ board2.Focusable = true;
+ board2.FocusGained += Board_FocusGained;
+ board2.FocusLost += Board_FocusLost;
+
+ button1 = new Button();
+ button1.BackgroundColor = Color.Green;
+ button1.Position2D = new Position2D(100, 700);
+ button1.Size2D = new Size2D(80, 50);
+ button1.Style.Text.Text = "+";
+ root.Add(button1);
+ button1.Focusable = true;
+ button1.ClickEvent += bar1Add;
+
+ button2 = new Button();
+ button2.BackgroundColor = Color.Green;
+ button2.Position2D = new Position2D(200, 700);
+ button2.Size2D = new Size2D(80, 50);
+ button2.Style.Text.Text = "-";
+ root.Add(button2);
+ button2.Focusable = true;
+ button2.ClickEvent += bar1Minus;
+
+ //button3 = new Button();
+ //button3.BackgroundColor = Color.Green;
+ //button3.Position2D = new Position2D(450, 700);
+ //button3.Size2D = new Size2D(80, 50);
+ //button3.Text = "+";
+ //root.Add(button3);
+ //button3.Focusable = true;
+ //button3.ClickEvent += Scroll2Add;
+
+ //button4 = new Button();
+ //button4.BackgroundColor = Color.Green;
+ //button4.Position2D = new Position2D(550, 700);
+ //button4.Size2D = new Size2D(80, 50);
+ //button4.Text = "-";
+ //root.Add(button4);
+ //button4.Focusable = true;
+ //button4.ClickEvent += Scroll2Minus;
+ }
+
+ private void Board_FocusLost(object sender, global::System.EventArgs e)
+ {
+ board.BackgroundColor = Color.Magenta;
+ }
+
+ private void Board_FocusGained(object sender, global::System.EventArgs e)
+ {
+ board.BackgroundColor = Color.Cyan;
+ }
+
+ private void bar1Add(object sender, global::System.EventArgs e)
+ {
+ board.Text = "+";
+ progressBar1_1.CurrentValue++;
+ }
+ private void bar1Minus(object sender, global::System.EventArgs e)
+ {
+ board.Text = "-";
+ progressBar1_1.CurrentValue--;
+ }
+
+ private void circleStatusChanged(object sender, global::System.EventArgs e)
+ {
+ global::System.Console.WriteLine("----------------");
+
+ status++;
+ if (status > 2)
+ status = 0;
+ if (status == 0)
+ {
+ button5.Style.Text.Text = "Buffer";
+ //progressCircle1.ProgressState = Progress.ProgressStatusType.Buffering;
+ }
+ if (status == 1)
+ {
+ button5.Style.Text.Text = "Deter";
+ //progressCircle1.ProgressState = Progress.ProgressStatusType.Determinate;
+ }
+ if (status == 2)
+ {
+ button5.Style.Text.Text = "indeter";
+ //progressCircle1.ProgressState = Progress.ProgressStatusType.Indeterminate;
+ }
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class RadioButtonSample : IExample
+ {
+ private View root;
+
+ private TextLabel[] createText = new TextLabel[2];
+ private TextLabel[] modeText = new TextLabel[4];
+ private TextLabel[] modeText2 = new TextLabel[4];
+
+ private RadioButton[] utilityRadioButton = new RadioButton[4];
+ private RadioButton[] familyRadioButton = new RadioButton[4];
+ private RadioButton[] foodRadioButton = new RadioButton[4];
+ private RadioButton[] kitchenRadioButton = new RadioButton[4];
+ private RadioButtonGroup[] group = new RadioButtonGroup[4];
+
+ private RadioButton[] utilityRadioButton2 = new RadioButton[4];
+ private RadioButton[] familyRadioButton2 = new RadioButton[4];
+ private RadioButton[] foodRadioButton2 = new RadioButton[4];
+ private RadioButton[] kitchenRadioButton2 = new RadioButton[4];
+ private RadioButtonGroup[] group2 = new RadioButtonGroup[4];
+
+ private static string[] mode = new string[]
+ {
+ "Utility",
+ "Family",
+ "Food",
+ "Kitchen",
+ };
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ BackgroundColor = Color.White,
+ };
+ window.Add(root);
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ createText[0] = new TextLabel();
+ createText[0].Text = "Create RadioButton just by properties";
+ createText[0].TextColor = Color.White;
+ createText[0].Size2D = new Size2D(500, 100);
+ createText[0].Position2D = new Position2D(400, 100);
+ root.Add(createText[0]);
+
+ int num = 4;
+ for (int i = 0; i < num; i++)
+ {
+ group[i] = new RadioButtonGroup();
+ modeText[i] = new TextLabel();
+ modeText[i].Text = mode[i];
+ modeText[i].Size2D = new Size2D(200, 48);
+ modeText[i].Position2D = new Position2D(300 + 200 * i, 200);
+ root.Add(modeText[i]);
+ }
+
+ for (int i = 0; i < num; i++)
+ {
+ utilityRadioButton[i] = new RadioButton();
+ utilityRadioButton[i].Size2D = new Size2D(48, 48);
+ utilityRadioButton[i].Position2D = new Position2D(300, 300 + i * 100);
+ utilityRadioButton[i].Style.Icon.Size = new Size(48, 48);
+ utilityRadioButton[i].Style.Icon.Padding.Start = 5;
+ utilityRadioButton[i].Style.Icon.Padding.End = 5;
+ utilityRadioButton[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ utilityRadioButton[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_on.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_on.png",
+ };
+
+ group[0].Add(utilityRadioButton[i]);
+ ////////
+ familyRadioButton[i] = new RadioButton();
+ familyRadioButton[i].Size2D = new Size2D(48, 48);
+ familyRadioButton[i].Position2D = new Position2D(500, 300 + i * 100);
+ familyRadioButton[i].Style.Icon.Size = new Size(48, 48);
+ familyRadioButton[i].Style.Icon.Padding.Start = 5;
+ familyRadioButton[i].Style.Icon.Padding.End = 5;
+ familyRadioButton[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ familyRadioButton[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_24c447.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_24c447.png",
+ };
+
+ group[1].Add(familyRadioButton[i]);
+ /////////
+ foodRadioButton[i] = new RadioButton();
+ foodRadioButton[i].Size2D = new Size2D(150, 48);
+ foodRadioButton[i].Position2D = new Position2D(700, 300 + i * 100);
+ foodRadioButton[i].Style.Icon.Size = new Size(48, 48);
+ foodRadioButton[i].Style.Icon.Padding.Start = 5;
+ foodRadioButton[i].Style.Icon.Padding.End = 5;
+ foodRadioButton[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ foodRadioButton[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_ec7510.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_ec7510.png",
+ };
+
+ //foodRadioButton[i].Text = "Radio" + i;
+ //foodRadioButton[i].TextAlignment = HorizontalAlignment.Begin;
+ //foodRadioButton[i].PointSize = 12;
+ //foodRadioButton[i].TextPaddingLeft = 70;
+
+ group[2].Add(foodRadioButton[i]);
+ ////////
+ kitchenRadioButton[i] = new RadioButton();
+ kitchenRadioButton[i].Size2D = new Size2D(48, 48);
+ kitchenRadioButton[i].Position2D = new Position2D(900, 300 + i * 100);
+ kitchenRadioButton[i].Style.Icon.Size = new Size(48, 48);
+ kitchenRadioButton[i].Style.Icon.Padding.Start = 5;
+ kitchenRadioButton[i].Style.Icon.Padding.End = 5;
+ kitchenRadioButton[i].Style.Icon.Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ };
+ kitchenRadioButton[i].Style.Icon.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_9762d9.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_9762d9.png",
+ };
+
+ group[3].Add(kitchenRadioButton[i]);
+
+ root.Add(utilityRadioButton[i]);
+ root.Add(familyRadioButton[i]);
+ root.Add(foodRadioButton[i]);
+ root.Add(kitchenRadioButton[i]);
+ }
+ //foodRadioButton[0].LayoutDirection = ViewLayoutDirectionType.RTL;
+ ///////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ createText[1] = new TextLabel();
+ createText[1].Text = "Create RadioButton just by Attributes";
+ createText[1].TextColor = Color.White;
+ createText[1].Size2D = new Size2D(500, 100);
+ createText[1].Position2D = new Position2D(1200, 100);
+ root.Add(createText[1]);
+
+ for (int i = 0; i < num; i++)
+ {
+ group2[i] = new RadioButtonGroup();
+ modeText2[i] = new TextLabel();
+ modeText2[i].Text = mode[i];
+ modeText2[i].Size2D = new Size2D(200, 48);
+ modeText2[i].Position2D = new Position2D(1100 + 200 * i, 200);
+ root.Add(modeText2[i]);
+ }
+
+ ButtonStyle utilityAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_on.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_on.png",
+ },
+ },
+ };
+ ButtonStyle familyAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_24c447.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_24c447.png",
+ },
+ },
+ };
+ ButtonStyle foodAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_ec7510.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_ec7510.png",
+ },
+ },
+ };
+ ButtonStyle kitchenAttrs = new ButtonStyle
+ {
+ Icon = new ImageControlStyle
+ {
+ Size = new Size(48, 48),
+ Opacity = new Selector<float?>
+ {
+ Normal = 1.0f,
+ Selected = 1.0f,
+ Disabled = 0.4f,
+ DisabledSelected = 0.4f
+ },
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_9762d9.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_radio_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_btn_radio_on_9762d9.png",
+ },
+ },
+ };
+ for (int i = 0; i < num; i++)
+ {
+ utilityRadioButton2[i] = new RadioButton(utilityAttrs);
+ utilityRadioButton2[i].Size2D = new Size2D(48, 48);
+ utilityRadioButton2[i].Position2D = new Position2D(1100, 300 + i * 100);
+ group2[0].Add(utilityRadioButton2[i]);
+
+ familyRadioButton2[i] = new RadioButton(familyAttrs);
+ familyRadioButton2[i].Size2D = new Size2D(48, 48);
+ familyRadioButton2[i].Position2D = new Position2D(1300, 300 + i * 100);
+ group2[1].Add(familyRadioButton2[i]);
+
+ foodRadioButton2[i] = new RadioButton(foodAttrs);
+ foodRadioButton2[i].Size2D = new Size2D(48, 48);
+ foodRadioButton2[i].Position2D = new Position2D(1500, 300 + i * 100);
+ group2[2].Add(foodRadioButton2[i]);
+
+ kitchenRadioButton2[i] = new RadioButton(kitchenAttrs);
+ kitchenRadioButton2[i].Size2D = new Size2D(48, 48);
+ kitchenRadioButton2[i].Position2D = new Position2D(1700, 300 + i * 100);
+ group2[3].Add(kitchenRadioButton2[i]);
+
+ root.Add(utilityRadioButton2[i]);
+ root.Add(familyRadioButton2[i]);
+ root.Add(foodRadioButton2[i]);
+ root.Add(kitchenRadioButton2[i]);
+ }
+
+ utilityRadioButton[2].IsEnabled = false;
+ familyRadioButton[2].IsEnabled = false;
+ foodRadioButton[2].IsEnabled = false;
+ kitchenRadioButton[2].IsEnabled = false;
+
+ utilityRadioButton2[2].IsEnabled = false;
+ familyRadioButton2[2].IsEnabled = false;
+ foodRadioButton2[2].IsEnabled = false;
+ kitchenRadioButton2[2].IsEnabled = false;
+
+ utilityRadioButton[3].IsEnabled = false;
+ familyRadioButton[3].IsEnabled = false;
+ foodRadioButton[3].IsEnabled = false;
+ kitchenRadioButton[3].IsEnabled = false;
+ utilityRadioButton[3].IsSelected = true;
+ familyRadioButton[3].IsSelected = true;
+ foodRadioButton[3].IsSelected = true;
+ kitchenRadioButton[3].IsSelected = true;
+
+ utilityRadioButton2[3].IsEnabled = false;
+ familyRadioButton2[3].IsEnabled = false;
+ foodRadioButton2[3].IsEnabled = false;
+ kitchenRadioButton2[3].IsEnabled = false;
+ utilityRadioButton2[3].IsSelected = true;
+ familyRadioButton2[3].IsSelected = true;
+ foodRadioButton2[3].IsSelected = true;
+ kitchenRadioButton2[3].IsSelected = true;
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ int num = 4;
+ for (int i = 0; i < num; i++)
+ {
+ root.Remove(utilityRadioButton[i]);
+ utilityRadioButton[i].Dispose();
+ utilityRadioButton[i] = null;
+
+ root.Remove(familyRadioButton[i]);
+ familyRadioButton[i].Dispose();
+ familyRadioButton[i] = null;
+
+ root.Remove(foodRadioButton[i]);
+ foodRadioButton[i].Dispose();
+ foodRadioButton[i] = null;
+
+ root.Remove(kitchenRadioButton[i]);
+ kitchenRadioButton[i].Dispose();
+ kitchenRadioButton[i] = null;
+
+ root.Remove(modeText[i]);
+ modeText[i].Dispose();
+ modeText[i] = null;
+
+ root.Remove(utilityRadioButton2[i]);
+ utilityRadioButton2[i].Dispose();
+ utilityRadioButton2[i] = null;
+
+ root.Remove(familyRadioButton2[i]);
+ familyRadioButton2[i].Dispose();
+ familyRadioButton2[i] = null;
+
+ root.Remove(foodRadioButton2[i]);
+ foodRadioButton2[i].Dispose();
+ foodRadioButton2[i] = null;
+
+ root.Remove(kitchenRadioButton2[i]);
+ kitchenRadioButton2[i].Dispose();
+ kitchenRadioButton2[i] = null;
+
+ root.Remove(modeText2[i]);
+ modeText2[i].Dispose();
+ modeText2[i] = null;
+ }
+
+ root.Remove(createText[0]);
+ createText[0].Dispose();
+ createText[0] = null;
+ root.Remove(createText[1]);
+ createText[1].Dispose();
+ createText[1] = null;
+
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class ScrollbarSample : IExample
+ {
+ private TextLabel board1, board2, board;
+ private Button button1, button2, button3, button4, button5;
+ private ScrollBar scrollBar1_1, scrollBar1_2, scrollBar2_1, scrollBar2_2; //1-null para 2-attributes; X_1-color; X_2 image track
+ private View root;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ };
+
+ CreateBoardAndButtons();
+
+ scrollBar1_1 = new ScrollBar();
+ scrollBar1_1.Position2D = new Position2D(50, 300);
+ scrollBar1_1.Size2D = new Size2D(300, 4);
+ scrollBar1_1.Style.Track.BackgroundColor = Color.Green;
+ scrollBar1_1.MaxValue = (int)scrollBar1_1.SizeWidth / 10;
+ scrollBar1_1.MinValue = 0;
+ scrollBar1_1.Style.Thumb.Size = new Size(30, 4);
+ scrollBar1_1.CurrentValue = 0; //set after thumbsize
+ scrollBar1_1.Style.Thumb.BackgroundColor = Color.Black;
+ root.Add(scrollBar1_1);
+
+ scrollBar1_2 = new ScrollBar();
+ scrollBar1_2.Position2D = new Position2D(50, 400);
+ scrollBar1_2.Size2D = new Size2D(300, 4);
+ scrollBar1_2.Style.Track.BackgroundColor = Color.Green;
+ scrollBar1_2.MaxValue = (int)scrollBar1_2.SizeWidth / 10;
+ scrollBar1_2.MinValue = 0;
+ scrollBar1_2.Style.Thumb.Size = new Size(30, 4);
+ scrollBar1_2.CurrentValue = 0;//set after thumbsize
+ scrollBar1_2.Style.Thumb.BackgroundColor = Color.Yellow;
+ scrollBar1_2.Style.Track.ResourceUrl = CommonResource.GetTVResourcePath() + "component/c_progressbar/c_progressbar_white_buffering.png";
+
+ root.Add(scrollBar1_2);
+
+ ScrollBarStyle attr = new ScrollBarStyle
+ {
+ Track = new ImageViewStyle
+ {
+ BackgroundColor = new Selector<Color>
+ {
+ All = new Color(0.43f, 0.43f, 0.43f, 0.1f),
+ }
+ },
+ Thumb = new ImageViewStyle
+ {
+ BackgroundColor = new Selector<Color>
+ {
+ All = new Color(1.0f, 0.0f, 0.0f, 0.2f),
+ }
+ },
+ };
+
+ scrollBar2_1 = new ScrollBar(attr);
+ scrollBar2_1.Position2D = new Position2D(500, 300);
+ scrollBar2_1.Size2D = new Size2D(300, 4);
+ scrollBar2_1.MaxValue = (int)scrollBar2_1.SizeWidth / 10;
+ scrollBar2_1.MinValue = 0;
+ scrollBar2_1.Style.Thumb.Size = new Size(30, 4);
+ scrollBar2_1.CurrentValue = 0; //set after thumbsize
+ root.Add(scrollBar2_1);
+
+ board.UpFocusableView = button1;
+
+ window.Add(root);
+
+ FocusManager.Instance.SetCurrentFocusView(button1);
+ }
+
+ void CreateBoardAndButtons()
+ {
+
+ board = new TextLabel();
+ board.Size2D = new Size2D(1000, 100);
+ board.Position2D = new Position2D(430, 900);
+ board.PointSize = 30;
+ board.HorizontalAlignment = HorizontalAlignment.Center;
+ board.VerticalAlignment = VerticalAlignment.Center;
+ board.BackgroundColor = Color.Magenta;
+ board.Text = "log pad";
+ root.Add(board);
+ board.Focusable = true;
+ board.FocusGained += Board_FocusGained;
+ board.FocusLost += Board_FocusLost;
+
+ board1 = new TextLabel();
+ board1.Size2D = new Size2D(300, 70);
+ board1.Position2D = new Position2D(50, 150);
+ board1.PointSize = 20;
+ board1.HorizontalAlignment = HorizontalAlignment.Center;
+ board1.VerticalAlignment = VerticalAlignment.Center;
+ board1.BackgroundColor = Color.Magenta;
+ board1.Text = "NULL parameter construction";
+ root.Add(board1);
+ board1.Focusable = true;
+ board1.FocusGained += Board_FocusGained;
+ board1.FocusLost += Board_FocusLost;
+
+ board2 = new TextLabel();
+ board2.Size2D = new Size2D(300, 70);
+ board2.Position2D = new Position2D(500, 150);
+ board2.PointSize = 20;
+ board2.HorizontalAlignment = HorizontalAlignment.Center;
+ board2.VerticalAlignment = VerticalAlignment.Center;
+ board2.BackgroundColor = Color.Magenta;
+ board2.Text = "Attribute construction";
+ root.Add(board2);
+ board2.Focusable = true;
+ board2.FocusGained += Board_FocusGained;
+ board2.FocusLost += Board_FocusLost;
+
+ button1 = new Button();
+ button1.BackgroundColor = Color.Green;
+ button1.Position2D = new Position2D(100, 700);
+ button1.Size2D = new Size2D(80, 50);
+ button1.Style.Text.Text = "+";
+ root.Add(button1);
+ button1.Focusable = true;
+ button1.ClickEvent += Scroll1Add;
+
+ button2 = new Button();
+ button2.BackgroundColor = Color.Green;
+ button2.Position2D = new Position2D(200, 700);
+ button2.Size2D = new Size2D(80, 50);
+ button2.Style.Text.Text = "-";
+ root.Add(button2);
+ button2.Focusable = true;
+ button2.ClickEvent += Scroll1Minus;
+
+ button5 = new Button();
+ button5.BackgroundColor = Color.Green;
+ button5.Position2D = new Position2D(400, 800);
+ button5.Size2D = new Size2D(100, 50);
+ button5.Style.Text.Text = "+ / - 4";
+ root.Add(button5);
+ button5.Focusable = true;
+ button5.ClickEvent += Scroll1_2move;
+
+ Button button22 = new Button();
+ button22.BackgroundColor = Color.Green;
+ button22.Position2D = new Position2D(100, 800);
+ button22.Size2D = new Size2D(200, 50);
+ button22.Style.Text.Text = "change direction";
+ root.Add(button22);
+ button22.Focusable = true;
+ button22.ClickEvent += Scroll1_2Changed;
+
+ button3 = new Button();
+ button3.BackgroundColor = Color.Green;
+ button3.Position2D = new Position2D(450, 700);
+ button3.Size2D = new Size2D(80, 50);
+ button3.Style.Text.Text = "+";
+ root.Add(button3);
+ button3.Focusable = true;
+ button3.ClickEvent += Scroll2Add;
+
+ button4 = new Button();
+ button4.BackgroundColor = Color.Green;
+ button4.Position2D = new Position2D(550, 700);
+ button4.Size2D = new Size2D(80, 50);
+ button4.Style.Text.Text = "-";
+ root.Add(button4);
+ button4.Focusable = true;
+ button4.ClickEvent += Scroll2Minus;
+ }
+
+ private void Board_FocusLost(object sender, global::System.EventArgs e)
+ {
+ board.BackgroundColor = Color.Magenta;
+ }
+
+ private void Board_FocusGained(object sender, global::System.EventArgs e)
+ {
+ board.BackgroundColor = Color.Cyan;
+ }
+
+ private void Scroll1Add(object sender, global::System.EventArgs e)
+ {
+ scrollBar1_1.CurrentValue++;
+ }
+ private void Scroll1Minus(object sender, global::System.EventArgs e)
+ {
+ scrollBar1_1.CurrentValue--;
+ }
+ private void Scroll2Add(object sender, global::System.EventArgs e)
+ {
+ scrollBar2_1.CurrentValue++;
+ }
+ private void Scroll2Minus(object sender, global::System.EventArgs e)
+ {
+ scrollBar2_1.CurrentValue--;
+ }
+
+ private void Scroll1_2Changed(object sender, global::System.EventArgs e)
+ {
+ if(scrollBar1_2.LayoutDirection == ViewLayoutDirectionType.LTR)
+ scrollBar1_2.LayoutDirection= ViewLayoutDirectionType.RTL;
+ else
+ scrollBar1_2.LayoutDirection = ViewLayoutDirectionType.LTR;
+ }
+
+ private void Scroll1_2move(object sender, global::System.EventArgs e)
+ {
+ if (scrollBar1_2.CurrentValue < scrollBar1_2.MaxValue / 2)
+ {
+ scrollBar1_2.SetCurrentValue(scrollBar1_2.MaxValue - 2);
+ }
+ else
+ {
+ scrollBar1_2.SetCurrentValue(2);
+ }
+ }
+
+ private void ScrollPan(object sender, global::System.EventArgs e)
+ {
+ board.Text = board.Text + " 1";
+ if (board.Text.Length > 20)
+ board.Text = "";
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class SliderSample : IExample
+ {
+ private const float MIN_VALUE = 0;
+ private const float MAX_VALUE = 100;
+
+ private View root;
+ private TextLabel[] createText = new TextLabel[2];
+ private Slider[] slider = new Slider[4];
+ private Slider[] slider2 = new Slider[4];
+ private TextLabel[] inforText = new TextLabel[2];
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ };
+ window.Add(root);
+ CreateInforText();
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ createText[0] = new TextLabel();
+ createText[0].Text = "Create Slider just by properties";
+ createText[0].TextColor = Color.White;
+ createText[0].Size2D = new Size2D(450, 100);
+ createText[0].Position2D = new Position2D(200, 100);
+ createText[0].MultiLine = true;
+ root.Add(createText[0]);
+
+ slider[0] = CreateByProperty(40, 300, 800, 50, 20, Slider.DirectionType.Horizontal);
+ slider[1] = CreateByProperty(300, 450, 50, 400, 20, Slider.DirectionType.Vertical);
+
+ slider[2] = CreateByProperty(40, 400, 800, 50, 30, Slider.DirectionType.Horizontal);
+ slider[2].Style.LowIndicator.Text = "SubText";
+ slider[2].LowIndicatorSize = new Size(100, 40);
+
+ slider[3] = CreateByProperty(600, 450, 50, 400, 30, Slider.DirectionType.Vertical);
+ slider[3].Style.LowIndicator.Text = "SubText";
+ slider[3].LowIndicatorSize = new Size(100, 40);
+
+ /////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ createText[1] = new TextLabel();
+ createText[1].TextColor = Color.White;
+ createText[1].Text = "Create Slider just by Attributes";
+ createText[1].Size2D = new Size2D(450, 100);
+ createText[1].Position2D = new Position2D(1000, 100);
+ createText[1].MultiLine = true;
+ root.Add(createText[1]);
+
+ SliderStyle attributes = new SliderStyle
+ {
+ TrackThickness = 4,
+ Track = new ImageViewStyle
+ {
+ BackgroundColor = new Selector<Color>
+ {
+ All = new Color(0, 0, 0, 0.1f),
+ }
+ },
+
+ Progress = new ImageViewStyle
+ {
+ BackgroundColor = new Selector<Color>
+ {
+ All = new Color(0.05f, 0.63f, 0.9f, 1),
+ }
+ },
+
+ Thumb = new ImageViewStyle
+ {
+ Size = new Size(60, 60),
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_slide_handler_normal.png",
+ Pressed = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_slide_handler_press.png",
+ },
+ BackgroundImage = new Selector<string>
+ {
+ Normal = "",
+ Pressed = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_slide_handler_effect.png",
+ }
+ },
+ //ThumbBackground = new ImageViewStyle
+ //{
+ // Size = new Size(60, 60),
+ // ResourceUrl = new Selector<string>
+ // {
+ // Normal = "",
+ // Pressed = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_slide_handler_effect.png",
+ // }
+ //}
+ };
+
+ slider2[0] = CreateByAttributes(attributes, 890, 300, 800, 50, 20, Slider.DirectionType.Horizontal);
+ slider2[1] = CreateByAttributes(attributes, 1150, 450, 50, 400, 20, Slider.DirectionType.Vertical);
+
+ slider2[2] = CreateByAttributes(attributes, 890, 400, 800, 50, 30, Slider.DirectionType.Horizontal);
+ slider2[2].Style.LowIndicator.Text = "SubText";
+ slider2[2].LowIndicatorSize = new Size(100, 40);
+
+ slider2[3] = CreateByAttributes(attributes, 1450, 450, 50, 400, 30, Slider.DirectionType.Vertical);
+ slider2[3].Style.LowIndicator.Text = "SubText";
+ slider2[3].LowIndicatorSize = new Size(100, 40);
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ if (slider[i] != null)
+ {
+ root.Remove(slider[i]);
+ slider[i].Dispose();
+ slider[i] = null;
+ }
+ if (slider2[i] != null)
+ {
+ root.Remove(slider2[i]);
+ slider2[i].Dispose();
+ slider2[i] = null;
+ }
+ }
+
+ for (int i = 0; i < 2; i++)
+ {
+ if (createText[i] != null)
+ {
+ root.Remove(createText[i]);
+ createText[i].Dispose();
+ createText[i] = null;
+ }
+
+ if (inforText[i] != null)
+ {
+ root.Remove(inforText[i]);
+ inforText[i].Dispose();
+ inforText[i] = null;
+ }
+ }
+
+ Window.Instance.Remove(root);
+ root.Dispose();
+ root = null;
+ }
+ }
+
+ private void CreateInforText()
+ {
+ for (int i = 0; i < 2; i++)
+ {
+ inforText[i] = new TextLabel();
+ inforText[i].Size2D = new Size2D(450, 60);
+ inforText[i].Position2D = new Position2D(200 + 800 * i, 200);
+ inforText[i].PointSize = 20;
+ inforText[i].TextColor = Color.Blue;
+ inforText[i].Text = "currentValue = ";
+ inforText[i].BackgroundColor = new Color(0, 0, 0, 0.1f);
+ inforText[i].HorizontalAlignment = HorizontalAlignment.Center;
+ inforText[i].VerticalAlignment = VerticalAlignment.Center;
+ root.Add(inforText[i]);
+ }
+ }
+
+ private Slider CreateByProperty(int posX, int posY, int w, int h, int curValue, Slider.DirectionType dir)
+ {
+ Slider source = new Slider();
+ source.TrackThickness = 4;
+ source.Style.Track.BackgroundColor = new Color(0, 0, 0, 0.1f);
+ source.Style.Progress.BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1);
+ source.Style.Thumb.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_slide_handler_normal.png",
+ Pressed = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_slide_handler_press.png",
+ };
+ source.Style.Thumb.Size = new Size(60, 60);
+ source.Style.Thumb.BackgroundImage = new Selector<string>
+ {
+ Normal = "",
+ Pressed = CommonResource.GetFHResourcePath() + "9. Controller/controller_btn_slide_handler_effect.png",
+ };
+ source.Direction = dir;
+ root.Add(source);
+ source.Focusable = true;
+ source.MinValue = MIN_VALUE;
+ source.MaxValue = MAX_VALUE;
+ source.StateChangedEvent += OnStateChanged;
+ source.ValueChangedEvent += OnValueChanged;
+ source.SlidingFinishedEvent += OnSlidingFinished;
+
+ source.Position2D = new Position2D(posX, posY);
+ source.Size2D = new Size2D(w, h);
+ source.CurrentValue = curValue;
+ return source;
+ }
+
+ private Slider CreateByAttributes(SliderStyle attrs, int posX, int posY, int w, int h, int curValue, Slider.DirectionType dir)
+ {
+ Slider source = new Slider(attrs);
+ source.Direction = dir;
+ root.Add(source);
+ source.Focusable = true;
+ source.MinValue = MIN_VALUE;
+ source.MaxValue = MAX_VALUE;
+ source.StateChangedEvent += OnStateChanged;
+ source.ValueChangedEvent += OnValueChanged;
+ source.SlidingFinishedEvent += OnSlidingFinished;
+
+ source.Position2D = new Position2D(posX, posY);
+ source.Size2D = new Size2D(w, h);
+ source.CurrentValue = curValue;
+ return source;
+ }
+
+ private void OnValueChanged(object sender, Slider.ValueChangedArgs args)
+ {
+ Slider source = sender as Slider;
+ if (source != null)
+ {
+ if (source == slider2[0] || source == slider2[1] || source == slider2[2] || source == slider2[3])
+ {
+ inforText[1].Text = "currentValue = " + args.CurrentValue;
+ }
+ else
+ {
+ inforText[0].Text = "currentValue = " + args.CurrentValue;
+ }
+ }
+ }
+
+ private void OnSlidingFinished(object sender, Slider.SlidingFinishedArgs args)
+ {
+ Slider source = sender as Slider;
+ if (source != null)
+ {
+ if (source == slider2[0] || source == slider2[1] || source == slider2[2] || source == slider2[3])
+ {
+ inforText[1].Text = "Finished currentValue = " + args.CurrentValue;
+ }
+ else
+ {
+ inforText[0].Text = "Finished currentValue = " + args.CurrentValue;
+ }
+ }
+ }
+
+ private void OnStateChanged(object sender, Slider.StateChangedArgs args)
+ {
+ if (sender is Tizen.NUI.Components.Slider)
+ {
+ Tizen.NUI.Components.Slider slider = sender as Tizen.NUI.Components.Slider;
+ if (slider != null)
+ {
+ // Do something
+ }
+ }
+ }
+ }
+}
--- /dev/null
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class SwitchSample : IExample
+ {
+ private View root;
+
+ private TextLabel[] createText = new TextLabel[2];
+ private TextLabel[] modeText = new TextLabel[4];
+ private TextLabel[] modeText2 = new TextLabel[4];
+
+ private Switch[] utilitySwitch = new Switch[4];
+ private Switch[] familySwitch = new Switch[4];
+ private Switch[] foodSwitch = new Switch[4];
+ private Switch[] kitchenSwitch = new Switch[4];
+
+ private Switch[] utilitySwitch2 = new Switch[4];
+ private Switch[] familySwitch2 = new Switch[4];
+ private Switch[] foodSwitch2 = new Switch[4];
+ private Switch[] kitchenSwitch2 = new Switch[4];
+
+ private static string[] mode = new string[]
+ {
+ "Utility",
+ "Family",
+ "Food",
+ "Kitchen",
+ };
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ };
+ window.Add(root);
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ createText[0] = new TextLabel();
+ createText[0].Text = "Create Switch just by properties";
+ createText[0].Size2D = new Size2D(500, 100);
+ createText[0].Position2D = new Position2D(400, 100);
+ root.Add(createText[0]);
+
+ int num = 4;
+ for (int i = 0; i < num; i++)
+ {
+ modeText[i] = new TextLabel();
+ modeText[i].Text = mode[i];
+ modeText[i].Size2D = new Size2D(200, 48);
+ modeText[i].Position2D = new Position2D(300 + 200 * i, 200);
+ root.Add(modeText[i]);
+ }
+
+ for (int i = 0; i < num; i++)
+ {
+ utilitySwitch[i] = new Switch();
+ utilitySwitch[i].Size2D = new Size2D(96, 60);
+ utilitySwitch[i].Position2D = new Position2D(300, 300 + i * 100);
+ utilitySwitch[i].Style.Thumb.Size = new Size(60, 60);
+ utilitySwitch[i].Style.Track.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_on.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_on_dim.png",
+ };
+ utilitySwitch[i].Style.Thumb.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ };
+
+ ////////
+ familySwitch[i] = new Switch();
+ familySwitch[i].Size2D = new Size2D(96, 60);
+ familySwitch[i].Position2D = new Position2D(500, 300 + i * 100);
+ familySwitch[i].Style.Thumb.Size = new Size(60, 60);
+ familySwitch[i].Style.Track.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_24c447.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_dim_24c447.png",
+ };
+ familySwitch[i].Style.Thumb.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ };
+ /////////
+ foodSwitch[i] = new Switch();
+ foodSwitch[i].Size2D = new Size2D(96, 60);
+ foodSwitch[i].Position2D = new Position2D(700, 300 + i * 100);
+ foodSwitch[i].Style.Thumb.Size = new Size(60, 60);
+ foodSwitch[i].Style.Track.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_ec7510.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_dim_ec7510.png",
+ };
+ foodSwitch[i].Style.Thumb.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ };
+
+ ////////
+ kitchenSwitch[i] = new Switch();
+ kitchenSwitch[i].Size2D = new Size2D(96, 60);
+ kitchenSwitch[i].Position2D = new Position2D(900, 300 + i * 100);
+ kitchenSwitch[i].Style.Thumb.Size = new Size(60, 60);
+ kitchenSwitch[i].Style.Track.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_9762d9.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_dim_9762d9.png",
+ };
+ kitchenSwitch[i].Style.Thumb.ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ };
+
+ root.Add(utilitySwitch[i]);
+ root.Add(familySwitch[i]);
+ root.Add(foodSwitch[i]);
+ root.Add(kitchenSwitch[i]);
+ }
+
+ ///////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ createText[1] = new TextLabel();
+ createText[1].Text = "Create Switch just by Attributes";
+ createText[1].Size2D = new Size2D(500, 100);
+ createText[1].Position2D = new Position2D(1200, 100);
+ root.Add(createText[1]);
+
+ for (int i = 0; i < num; i++)
+ {
+ modeText2[i] = new TextLabel();
+ modeText2[i].Text = mode[i];
+ modeText2[i].Size2D = new Size2D(200, 48);
+ modeText2[i].Position2D = new Position2D(1100 + 200 * i, 200);
+ root.Add(modeText2[i]);
+ }
+
+ SwitchStyle utilityAttrs = new SwitchStyle
+ {
+ IsSelectable = true,
+ Track = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_on.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_on_dim.png",
+ },
+ },
+ Thumb = new ImageViewStyle
+ {
+ Size = new Size(60, 60),
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ },
+ },
+ };
+ SwitchStyle familyAttrs = new SwitchStyle
+ {
+ IsSelectable = true,
+ Track = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_24c447.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_dim_24c447.png",
+ },
+ },
+ Thumb = new ImageViewStyle
+ {
+ Size = new Size(60, 60),
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ },
+ },
+ };
+ SwitchStyle foodAttrs = new SwitchStyle
+ {
+ IsSelectable = true,
+ Track = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_ec7510.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_dim_ec7510.png",
+ },
+ },
+ Thumb = new ImageViewStyle
+ {
+ Size = new Size(60, 60),
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ },
+ },
+ };
+ SwitchStyle kitchenAttrs = new SwitchStyle
+ {
+ IsSelectable = true,
+ Track = new ImageViewStyle
+ {
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_9762d9.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_bg_off_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/[Controller] App Primary Color/controller_switch_bg_on_dim_9762d9.png",
+ },
+ },
+ Thumb = new ImageViewStyle
+ {
+ Size = new Size(60, 60),
+ ResourceUrl = new Selector<string>
+ {
+ Normal = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Selected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler.png",
+ Disabled = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ DisabledSelected = CommonResource.GetFHResourcePath() + "9. Controller/controller_switch_handler_dim.png",
+ },
+ },
+ };
+ for (int i = 0; i < num; i++)
+ {
+ utilitySwitch2[i] = new Switch(utilityAttrs);
+ utilitySwitch2[i].Size2D = new Size2D(96, 60);
+ utilitySwitch2[i].Position2D = new Position2D(1100, 300 + i * 100);
+
+ familySwitch2[i] = new Switch(familyAttrs);
+ familySwitch2[i].Size2D = new Size2D(96, 60);
+ familySwitch2[i].Position2D = new Position2D(1300, 300 + i * 100);
+
+ foodSwitch2[i] = new Switch(foodAttrs);
+ foodSwitch2[i].Size2D = new Size2D(96, 60);
+ foodSwitch2[i].Position2D = new Position2D(1500, 300 + i * 100);
+
+ kitchenSwitch2[i] = new Switch(kitchenAttrs);
+ kitchenSwitch2[i].Size2D = new Size2D(96, 60);
+ kitchenSwitch2[i].Position2D = new Position2D(1700, 300 + i * 100);
+
+ root.Add(utilitySwitch2[i]);
+ root.Add(familySwitch2[i]);
+ root.Add(foodSwitch2[i]);
+ root.Add(kitchenSwitch2[i]);
+ }
+
+ utilitySwitch[2].IsEnabled = false;
+ familySwitch[2].IsEnabled = false;
+ foodSwitch[2].IsEnabled = false;
+ kitchenSwitch[2].IsEnabled = false;
+
+ utilitySwitch2[2].IsEnabled = false;
+ familySwitch2[2].IsEnabled = false;
+ foodSwitch2[2].IsEnabled = false;
+ kitchenSwitch2[2].IsEnabled = false;
+
+ utilitySwitch[3].IsEnabled = false;
+ familySwitch[3].IsEnabled = false;
+ foodSwitch[3].IsEnabled = false;
+ kitchenSwitch[3].IsEnabled = false;
+ utilitySwitch[3].IsSelected = true;
+ familySwitch[3].IsSelected = true;
+ foodSwitch[3].IsSelected = true;
+ kitchenSwitch[3].IsSelected = true;
+
+ utilitySwitch2[3].IsEnabled = false;
+ familySwitch2[3].IsEnabled = false;
+ foodSwitch2[3].IsEnabled = false;
+ kitchenSwitch2[3].IsEnabled = false;
+ utilitySwitch2[3].IsSelected = true;
+ familySwitch2[3].IsSelected = true;
+ foodSwitch2[3].IsSelected = true;
+ kitchenSwitch2[3].IsSelected = true;
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ int num = 4;
+ for (int i = 0; i < num; i++)
+ {
+ root.Remove(utilitySwitch[i]);
+ utilitySwitch[i].Dispose();
+ utilitySwitch[i] = null;
+
+ root.Remove(familySwitch[i]);
+ familySwitch[i].Dispose();
+ familySwitch[i] = null;
+
+ root.Remove(foodSwitch[i]);
+ foodSwitch[i].Dispose();
+ foodSwitch[i] = null;
+
+ root.Remove(kitchenSwitch[i]);
+ kitchenSwitch[i].Dispose();
+ kitchenSwitch[i] = null;
+
+ root.Remove(modeText[i]);
+ modeText[i].Dispose();
+ modeText[i] = null;
+
+ root.Remove(utilitySwitch2[i]);
+ utilitySwitch2[i].Dispose();
+ utilitySwitch2[i] = null;
+
+ root.Remove(familySwitch2[i]);
+ familySwitch2[i].Dispose();
+ familySwitch2[i] = null;
+
+ root.Remove(foodSwitch2[i]);
+ foodSwitch2[i].Dispose();
+ foodSwitch2[i] = null;
+
+ root.Remove(kitchenSwitch2[i]);
+ kitchenSwitch2[i].Dispose();
+ kitchenSwitch2[i] = null;
+
+ root.Remove(modeText2[i]);
+ modeText2[i].Dispose();
+ modeText2[i] = null;
+ }
+
+ root.Remove(createText[0]);
+ createText[0].Dispose();
+ createText[0] = null;
+ root.Remove(createText[1]);
+ createText[1].Dispose();
+ createText[1] = null;
+
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+using System.Collections.Generic;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class TabSample : IExample
+ {
+ private View root;
+
+ private TextLabel[] createText = new TextLabel[2];
+
+ private Tab tab = null;
+ private Tab tab2 = null;
+
+ private Button button = null;
+ private Button button2 = null;
+ private int index = 0;
+
+ private static string[] mode = new string[]
+ {
+ "Utility Tab",
+ "Family Tab",
+ "Food Tab",
+ "Kitchen Tab",
+ };
+ private static Color[] color = new Color[]
+ {
+ new Color(0.05f, 0.63f, 0.9f, 1),//#ff0ea1e6 Utility
+ new Color(0.14f, 0.77f, 0.28f, 1),//#ff24c447 Family
+ new Color(0.75f, 0.46f, 0.06f, 1),//#ffec7510 Food
+ new Color(0.59f, 0.38f, 0.85f, 1),//#ff9762d9 Kitchen
+ };
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size2D = new Size2D(1920, 1080),
+ };
+ window.Add(root);
+
+ ///////////////////////////////////////////////Create by Property//////////////////////////////////////////////////////////
+ createText[0] = new TextLabel();
+ createText[0].Text = "Create Tab just by properties";
+ createText[0].Size2D = new Size2D(450, 100);
+ createText[0].Position2D = new Position2D(200, 100);
+ createText[0].MultiLine = true;
+ root.Add(createText[0]);
+
+ tab = new Tab();
+ tab.Size2D = new Size2D(700, 108);
+ tab.Position2D = new Position2D(100, 300);
+ tab.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.5f);
+ //tab.IsNatureTextWidth = true;
+ //tab.ItemGap = 40;
+ //tab.LeftSpace = 56;
+ //tab.RightSpace = 56;
+ //tab.TopSpace = 1;
+ //tab.BottomSpace = 0;
+ tab.Style.UnderLine.Size = new Size(1, 3);
+ tab.Style.UnderLine.BackgroundColor = color[0];
+ tab.Style.Text.PointSize = 25;
+ tab.Style.Text.TextColor = new Selector<Color>
+ {
+ Normal = Color.Black,
+ Selected = color[0],
+ };
+ tab.ItemChangedEvent += TabItemChangedEvent;
+ root.Add(tab);
+
+ for (int i = 0; i < 3; i++)
+ {
+ Tab.TabItemData item = new Tab.TabItemData();
+ item.Text = "Tab " + i;
+ if(i==1)
+ {
+ item.Text = "Long Tab " + i;
+ }
+ tab.AddItem(item);
+ }
+ tab.SelectedItemIndex = 0;
+
+ ///////////////////////////////////////////////Create by Attributes//////////////////////////////////////////////////////////
+ createText[1] = new TextLabel();
+ createText[1].Text = "Create Tab just by Attributes";
+ createText[1].Size2D = new Size2D(450, 100);
+ createText[1].Position2D = new Position2D(1000, 100);
+ createText[1].MultiLine = true;
+ root.Add(createText[1]);
+
+ TabStyle attrs = new TabStyle
+ {
+ //IsNatureTextWidth = false,
+ ItemPadding = new Extents(56, 56, 1, 0),
+ UnderLine = new ViewStyle
+ {
+ Size = new Size(1, 3),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft,
+ PivotPoint = Tizen.NUI.PivotPoint.BottomLeft,
+ BackgroundColor = new Selector<Color> { All = color[0]},
+ },
+ Text = new TextLabelStyle
+ {
+ PointSize = new Selector<float?> { All = 25 },
+ TextColor = new Selector<Color>
+ {
+ Normal = Color.Black,
+ Selected = color[0],
+ },
+ },
+ };
+
+ tab2 = new Tab(attrs);
+ tab2.Size2D = new Size2D(500, 108);
+ tab2.Position2D = new Position2D(900, 300);
+ tab2.BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.5f);
+ tab2.ItemChangedEvent += Tab2ItemChangedEvent;
+ root.Add(tab2);
+
+ for (int i = 0; i < 3; i++)
+ {
+ Tab.TabItemData item = new Tab.TabItemData();
+ item.Text = "Tab " + i;
+ tab2.AddItem(item);
+ }
+ tab2.SelectedItemIndex = 0;
+
+ button = new Button();
+ button.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png";
+ button.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5);
+ button.Size2D = new Size2D(280, 80);
+ button.Position2D = new Position2D(400, 700);
+ button.Style.Text.Text = mode[index];
+ button.ClickEvent += ButtonClickEvent;
+ root.Add(button);
+
+ button2 = new Button();
+ button2.Style.BackgroundImage = CommonResource.GetTVResourcePath() + "component/c_buttonbasic/c_basic_button_white_bg_normal_9patch.png";
+ button2.Style.BackgroundImageBorder = new Rectangle(4, 4, 5, 5);
+ button2.Size2D = new Size2D(580, 80);
+ button2.Position2D = new Position2D(250, 500);
+ button2.Style.Text.Text = "LayoutDirection is left to right";
+ button2.ClickEvent += ButtonClickEvent2;
+ root.Add(button2);
+ }
+
+ private void TabItemChangedEvent(object sender, Tab.ItemChangedEventArgs e)
+ {
+ createText[0].Text = "Create Tab just by properties, Selected index from " + e.PreviousIndex + " to " + e.CurrentIndex;
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ if (button != null)
+ {
+ root.Remove(button);
+ button.Dispose();
+ button = null;
+ }
+
+ if (button2 != null)
+ {
+ root.Remove(button2);
+ button2.Dispose();
+ button2 = null;
+ }
+
+ if (tab != null)
+ {
+ root.Remove(tab);
+ tab.Dispose();
+ tab = null;
+ }
+ if (tab2 != null)
+ {
+ root.Remove(tab2);
+ tab2.Dispose();
+ tab2 = null;
+ }
+
+ if (createText[0] != null)
+ {
+ root.Remove(createText[0]);
+ createText[0].Dispose();
+ createText[0] = null;
+ }
+ if (createText[1] != null)
+ {
+ root.Remove(createText[1]);
+ createText[1].Dispose();
+ createText[1] = null;
+ }
+
+ Window.Instance.Remove(root);
+ root.Dispose();
+ root = null;
+ }
+ }
+
+ private void Tab2ItemChangedEvent(object sender, Tab.ItemChangedEventArgs e)
+ {
+ createText[1].Text = "Create Tab just by Attributes, Selected index from " + e.PreviousIndex + " to " + e.CurrentIndex;
+ }
+
+ private void ButtonClickEvent(object sender, Button.ClickEventArgs e)
+ {
+ index = (index + 1) % 4;
+ button.Style.Text.Text = mode[index];
+ tab.Style.UnderLine.BackgroundColor = color[index];
+ tab.Style.Text.TextColor = new Selector<Color>
+ {
+ Normal = Color.Black,
+ Selected = color[index],
+ };
+ tab2.Style.UnderLine.BackgroundColor = color[index];
+ tab2.Style.Text.TextColor = new Selector<Color>
+ {
+ Normal = Color.Black,
+ Selected = color[index],
+ };
+ }
+
+ private void ButtonClickEvent2(object sender, Button.ClickEventArgs e)
+ {
+ if (tab.LayoutDirection == ViewLayoutDirectionType.LTR)
+ {
+ tab.LayoutDirection = ViewLayoutDirectionType.RTL;
+ tab2.LayoutDirection = ViewLayoutDirectionType.RTL;
+ button2.Style.Text.Text = "LayoutDirection is right to left";
+ }
+ else
+ {
+ tab.LayoutDirection = ViewLayoutDirectionType.LTR;
+ tab2.LayoutDirection = ViewLayoutDirectionType.LTR;
+ button2.Style.Text.Text = "LayoutDirection is left to right";
+ }
+ }
+ }
+}
--- /dev/null
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.Samples
+{
+ public class ToastSample : IExample
+ {
+ private TextLabel board1, board2, board;
+ private Button button1, button2;
+ private Toast toast1_1, toast2_1; //1-null para 2-attributes; X_1-color; X_2 image track
+ private View root;
+
+ public void Activate()
+ {
+ Window window = Window.Instance;
+
+ root = new View()
+ {
+ Size = new Size(1920, 1080),
+ BackgroundColor = new Color(0.8f, 0.8f, 0.8f, 0.6f),
+ };
+
+ CreateBoardAndButtons();
+
+ toast1_1 = Toast.FromText("null parameter construction", 1000);
+ toast1_1.Size = new Size(500, 132);
+ toast1_1.Post(window);
+
+ ToastStyle attr = new ToastStyle
+ {
+ Size = new Size(512, 132),
+ BackgroundImage = CommonResource.GetFHResourcePath() + "12. Toast Popup/toast_background.png",
+ BackgroundImageBorder = new Rectangle(64, 64, 4, 4),
+ Duration = 3000
+ };
+
+ toast2_1 = new Toast(attr);
+ toast2_1.Message = "attibute parameter construction";
+ toast2_1.Post(window);
+ //root.Add(toast2_1);
+
+
+ board.UpFocusableView = button1;
+ window.Add(root);
+
+ FocusManager.Instance.SetCurrentFocusView(button1);
+ }
+
+ void CreateBoardAndButtons()
+ {
+ board = new TextLabel();
+ board.Size = new Size(1000, 100);
+ board.Position = new Position(430, 900);
+ board.PointSize = 30;
+ board.HorizontalAlignment = HorizontalAlignment.Center;
+ board.VerticalAlignment = VerticalAlignment.Center;
+ board.BackgroundColor = Color.Magenta;
+ board.Text = "log pad";
+ root.Add(board);
+ board.Focusable = true;
+ board.FocusGained += Board_FocusGained;
+ board.FocusLost += Board_FocusLost;
+
+ board1 = new TextLabel();
+ board1.Size = new Size(300, 70);
+ board1.Position = new Position(50, 200);
+ board1.PointSize = 20;
+ board1.HorizontalAlignment = HorizontalAlignment.Center;
+ board1.VerticalAlignment = VerticalAlignment.Center;
+ board1.BackgroundColor = Color.Magenta;
+ board1.Text = "NULL parameter construction";
+ root.Add(board1);
+ board1.Focusable = true;
+ board1.FocusGained += Board_FocusGained;
+ board1.FocusLost += Board_FocusLost;
+
+ board2 = new TextLabel();
+ board2.Size = new Size(300, 70);
+ board2.Position = new Position(650, 200);
+ board2.PointSize = 20;
+ board2.HorizontalAlignment = HorizontalAlignment.Center;
+ board2.VerticalAlignment = VerticalAlignment.Center;
+ board2.BackgroundColor = Color.Magenta;
+ board2.Text = "Attribute construction";
+ root.Add(board2);
+ board2.Focusable = true;
+ board2.FocusGained += Board_FocusGained;
+ board2.FocusLost += Board_FocusLost;
+
+ button1 = new Button();
+ button1.BackgroundColor = Color.Green;
+ button1.Position = new Position(80, 600);
+ button1.Size = new Size(200, 50);
+ button1.Style.Text.Text = "toast1_1 Show";
+ root.Add(button1);
+ button1.Focusable = true;
+ button1.ClickEvent += toast1_1Show;
+
+ button2 = new Button();
+ button2.BackgroundColor = Color.Green;
+ button2.Position = new Position(700, 600);
+ button2.Size = new Size(100, 50);
+ button2.Style.Text.Text = "toast2_1 Show";
+ root.Add(button2);
+ button2.Focusable = true;
+ button2.ClickEvent += toast2_1Show;
+ }
+
+ private void Board_FocusLost(object sender, global::System.EventArgs e)
+ {
+ board.BackgroundColor = Color.Magenta;
+ }
+
+ private void Board_FocusGained(object sender, global::System.EventArgs e)
+ {
+ board.BackgroundColor = Color.Cyan;
+ }
+
+ private void toast1_1Show(object sender, global::System.EventArgs e)
+ {
+ board.Text = "toast1_1 show: ";
+ toast1_1.Show();
+ }
+
+ private void toast2_1Show(object sender, global::System.EventArgs e)
+ {
+ board.Text = "toast2_1 show: ";
+ toast2_1.Show();
+ }
+
+ private void toast1FPSMinus(object sender, global::System.EventArgs e)
+ {
+ //board.Text = "toast1_1 FPS: " + toast1_1.FPS.ToString();
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ Window.Instance.Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ <RootNamespace>Tizen.NUI.Samples</RootNamespace>
+ <AssemblyName>Tizen.NUI.Samples</AssemblyName>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Tizen.NET" Version="8.0.0.15045" />
+ <PackageReference Include="Tizen.NET.Sdk" Version="1.0.9" />
+ </ItemGroup>
+
+</Project>
+
--- /dev/null
+{"v":"5.0.1","fr":30.0000305175781,"ip":0,"op":124.000126139323,"w":800,"h":600,"nm":"Camera_003_render","ddd":0,"assets":[{"id":"comp_4","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"flash ring","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[133,-67,0],"ix":2},"a":{"a":0,"k":[74,-135,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.09,0.09],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p09_1_0p167_0p167","0p09_1_0p167_0p167"],"t":73,"s":[0,0],"e":[148,148]},{"t":79.0000803629557}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.09],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p09_1_0p167_0p167"],"t":73,"s":[23],"e":[0]},{"t":82.0000834147135}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[74,-135],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":73.0000742594401,"op":83.0000844319661,"st":73.0000742594401,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"button lines","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-35.5,-60.5,0],"ix":2},"a":{"a":0,"k":[72.5,-149.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[91,-152.25],[108,-160.75]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 5","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[60.25,-161.75],[49,-177.25]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[4.25,2.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 6","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[73.75,-162.5],[80.75,-179]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[4.25,2.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 4","np":3,"cix":2,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[53,-150.5],[34.25,-159.5]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 2","np":3,"cix":2,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.08],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p08_1_0p167_0p167"],"t":73.539,"s":[0],"e":[100]},{"t":80.0000813802083}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.08],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p08_1_0p167_0p167"],"t":71,"s":[0],"e":[100]},{"t":80.0000813802083}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":5,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":71.0000722249349,"op":81.0000823974609,"st":71.0000722249349,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"flash light","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[35.264],"e":[102.264]},{"t":80.0000813802083}],"ix":10},"p":{"a":0,"k":[132,-68,0],"ix":2},"a":{"a":0,"k":[-340,-162,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":4,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":143.286,"ix":5},"ir":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[0],"e":[25]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":76,"s":[25],"e":[0]},{"t":80.0000813802083}],"ix":6},"is":{"a":0,"k":193,"ix":8},"or":{"a":0,"k":73.6,"ix":7},"os":{"a":0,"k":0,"ix":9},"ix":1,"nm":"Polystar Path 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156862745,1,0.988235294118,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-340,-162],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":71.0000722249349,"op":81.0000823974609,"st":71.0000722249349,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"face button mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":101,"s":[216,302],"e":[0,302]},{"t":110.000111897786}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.204152006261,0.019608000213,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"face button","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":89.999,"ix":10},"p":{"a":0,"k":[34.724,96.498,0],"ix":2},"a":{"a":0,"k":[3,4,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.35,0.35],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p35_1_0p54_0","0p35_1_0p54_0"],"t":28,"s":[0,0],"e":[32,32]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":48,"s":[32,32],"e":[32,32]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.53,0.53],"y":[0,0]},"n":["0p833_0p833_0p53_0","0p833_0p833_0p53_0"],"t":97,"s":[32,32],"e":[105,105]},{"t":135.000137329102}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3,4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":28.0000284830729,"op":124.000126139323,"st":28.0000284830729,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"line mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":0,"k":[-2,-6.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p14_1_0p54_0","0p14_1_0p54_0"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"t":17.0000172932943}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"line","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90.084,"ix":10},"p":{"a":0,"k":[68.999,-5.896,0],"ix":2},"a":{"a":0,"k":[0.5,-56,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-171.5,-56],[165.5,-56]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.59],"y":[1]},"o":{"x":[0.29],"y":[0]},"n":["0p59_1_0p29_0"],"t":16,"s":[50],"e":[0]},{"t":33.0000335693359}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.59],"y":[1]},"o":{"x":[0.29],"y":[0]},"n":["0p59_1_0p29_0"],"t":16,"s":[50],"e":[100]},{"t":33.0000335693359}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":16.0000162760417,"op":124.000126139323,"st":16.0000162760417,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"flash mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":0,"k":[-2,-6.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p14_1_0p54_0","0p14_1_0p54_0"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"t":17.0000172932943}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"button","parent":20,"tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90.004,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":29,"s":[70.511],"e":[102.512]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":47,"s":[102.512],"e":[102.512]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[102.512],"e":[92.512]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":74,"s":[92.512],"e":[102.512]},{"i":{"x":[0.823],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p823_1_0p167_0"],"t":77,"s":[102.512],"e":[102.512]},{"i":{"x":[0.745],"y":[1]},"o":{"x":[1],"y":[-0.47]},"n":["0p745_1_1_-0p47"],"t":93,"s":[102.512],"e":[72.512]},{"t":105.000106811523}],"ix":3,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('X Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('X Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('X Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"y":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":29,"s":[-176.891],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":47,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":74,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":77,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":93,"s":[-176.421],"e":[-176.421]},{"t":105.000106811523}],"ix":4}},"a":{"a":0,"k":[94,-107.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"X Position - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[26,86],"ix":2},"p":{"a":0,"k":[74,24],"ix":3},"r":{"a":0,"k":24,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[94,-107.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":29.0000295003255,"op":106.000107828776,"st":29.0000295003255,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"body mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":0,"k":[-2,-6.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p14_1_0p54_0","0p14_1_0p54_0"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"t":17.0000172932943}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"flash","parent":20,"tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90.004,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":27,"s":[71.498],"e":[129.499]},{"i":{"x":[0.885],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p885_1_0p167_0"],"t":39,"s":[129.499],"e":[129.499]},{"i":{"x":[0.683],"y":[1]},"o":{"x":[0.688],"y":[-0.339]},"n":["0p683_1_0p688_-0p339"],"t":99,"s":[129.499],"e":[69.499]},{"t":110.000111897786}],"ix":3,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('X Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('X Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('X Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"y":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.59],"y":[0]},"n":["0p833_0p833_0p59_0"],"t":27,"s":[-6.965],"e":[-6.42]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":39,"s":[-6.42],"e":[-6.42]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":99,"s":[-6.42],"e":[-6.42]},{"t":110.000111897786}],"ix":4,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Y Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Y Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Y Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"}},"a":{"a":0,"k":[94,-107.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Y Position - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Y Position - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Y Position - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Overshoot","np":3,"mn":"ADBE Slider Control","ix":4,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Bounce","np":3,"mn":"ADBE Slider Control","ix":5,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Friction","np":3,"mn":"ADBE Slider Control","ix":6,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[79,72.861],"ix":2},"p":{"a":0,"k":[72,22],"ix":3},"r":{"a":0,"k":9,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[94,-107.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":27.0000274658203,"op":107.000108846029,"st":27.0000274658203,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"lens mask 2","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":101,"s":[216,302],"e":[0,302]},{"t":110.000111897786}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.204152006261,0.019608000213,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"lens","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[-22,-28.5,0],"ix":2},"a":{"a":0,"k":[3,4,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Size - Ellipse Path 1 - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p833_0p833_0p54_0","0p833_0p833_0p54_0"],"t":21,"s":[0,0],"e":[94,94]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":41,"s":[94,94],"e":[94,94]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.87,0.87],"y":[0,0]},"n":["0p833_0p833_0p87_0","0p833_0p833_0p87_0"],"t":97,"s":[94,94],"e":[183,183]},{"t":123.00012512207}],"ix":2,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Size - Ellipse Path 1 - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Size - Ellipse Path 1 - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Size - Ellipse Path 1 - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3,4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":21.0000213623047,"op":124.000126139323,"st":21.0000213623047,"bm":0},{"ddd":0,"ind":16,"ty":4,"nm":"lens mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":101,"s":[216,302],"e":[0,302]},{"t":110.000111897786}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.204152006261,0.019608000213,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":17,"ty":4,"nm":"lens","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[-22,-28.5,0],"ix":2},"a":{"a":0,"k":[3,4,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Size - Ellipse Path 1 - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p833_0p833_0p54_0","0p833_0p833_0p54_0"],"t":15,"s":[0,0],"e":[136,136]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":35,"s":[136,136],"e":[136,136]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.87,0.87],"y":[0,0]},"n":["0p833_0p833_0p87_0","0p833_0p833_0p87_0"],"t":97,"s":[136,136],"e":[212,212]},{"t":123.00012512207}],"ix":2,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Size - Ellipse Path 1 - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Size - Ellipse Path 1 - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Size - Ellipse Path 1 - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3,4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":15.0000152587891,"op":124.000126139323,"st":15.0000152587891,"bm":0},{"ddd":0,"ind":18,"ty":4,"nm":".gannon-gram","cl":"gannon-gram","parent":20,"sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":90.004,"ix":10},"p":{"a":0,"k":[85.672,-6.451,0],"ix":2},"a":{"a":0,"k":[-0.257,-6.362,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-4.887],[-4.517,0],[-1.575,1.76],[0,0],[0,0],[0,0],[0,0],[0,0],[1.413,0],[0,2.919],[-2.803,0],[-0.718,-1.089],[0,0],[3.196,0]],"o":[[0,4.864],[2.803,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.672,0.602],[-2.803,0],[0,-2.919],[1.621,0],[0,0],[-1.181,-1.83],[-4.517,0]],"v":[[-101.849,-7.713],[-93.626,0.301],[-87.048,-2.617],[-87.048,-8.524],[-94.414,-8.524],[-94.414,-5.698],[-90.291,-5.698],[-90.291,-3.822],[-93.626,-2.641],[-98.467,-7.713],[-93.626,-12.786],[-89.966,-10.84],[-87.233,-12.323],[-93.626,-15.704]],"c":true},"ix":2},"nm":"G","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"G","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-69.614,0],[-66.024,0],[-71.976,-15.45],[-76.099,-15.45],[-82.075,0],[-78.462,0],[-77.489,-2.664],[-70.587,-2.664]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-74.038,-12.601],[-71.49,-5.513],[-76.609,-5.513]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"A","np":5,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-49.766,0],[-46.593,0],[-46.593,-15.45],[-49.882,-15.45],[-49.882,-5.443],[-57.039,-15.45],[-60.421,-15.45],[-60.421,0],[-57.132,0],[-57.132,-10.377]],"c":true},"ix":2},"nm":"N","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"N","np":3,"cix":2,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-28.721,0],[-25.548,0],[-25.548,-15.45],[-28.837,-15.45],[-28.837,-5.443],[-35.995,-15.45],[-39.376,-15.45],[-39.376,0],[-36.087,0],[-36.087,-10.377]],"c":true},"ix":2},"nm":"N","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"N","np":3,"cix":2,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-4.656],[-4.656,0],[0,4.656],[4.679,0]],"o":[[0,4.656],[4.679,0],[0,-4.656],[-4.656,0]],"v":[[-19.073,-7.713],[-11.012,0.278],[-2.928,-7.713],[-11.012,-15.704]],"c":true},"ix":2},"nm":"O","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,-2.895],[2.849,0],[0,2.872],[-2.849,0]],"o":[[0,2.872],[-2.849,0],[0,-2.895],[2.849,0]],"v":[[-6.31,-7.713],[-11.012,-2.641],[-15.691,-7.713],[-11.012,-12.786]],"c":true},"ix":2},"nm":"O","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"O","np":5,"cix":2,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[14.196,0],[17.37,0],[17.37,-15.45],[14.081,-15.45],[14.081,-5.443],[6.923,-15.45],[3.541,-15.45],[3.541,0],[6.831,0],[6.831,-10.377]],"c":true},"ix":2},"nm":"N","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"N","np":3,"cix":2,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-4.887],[-4.517,0],[-1.575,1.76],[0,0],[0,0],[0,0],[0,0],[0,0],[1.413,0],[0,2.919],[-2.803,0],[-0.718,-1.089],[0,0],[3.196,0]],"o":[[0,4.864],[2.803,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.672,0.602],[-2.803,0],[0,-2.919],[1.621,0],[0,0],[-1.181,-1.83],[-4.517,0]],"v":[[23.845,-7.713],[32.068,0.301],[38.646,-2.617],[38.646,-8.524],[31.28,-8.524],[31.28,-5.698],[35.403,-5.698],[35.403,-3.822],[32.068,-2.641],[27.227,-7.713],[32.068,-12.786],[35.727,-10.84],[38.461,-12.323],[32.068,-15.704]],"c":true},"ix":2},"nm":"G","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"G","np":3,"cix":2,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,2.733],[3.22,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[1.668,-0.394],[0,-2.872],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[54.156,0],[57.932,0],[54.457,-5.883],[57.839,-10.47],[52.651,-15.45],[45.424,-15.45],[45.424,0],[48.713,0],[48.713,-5.536],[51.122,-5.536]],"c":true},"ix":2},"nm":"R","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,-1.297],[1.32,0],[0,0],[0,0],[0,0]],"o":[[0,1.297],[0,0],[0,0],[0,0],[1.32,0]],"v":[[54.48,-10.493],[52.164,-8.362],[48.713,-8.362],[48.713,-12.624],[52.164,-12.624]],"c":true},"ix":2},"nm":"R","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"R","np":5,"cix":2,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[75.308,0],[78.898,0],[72.945,-15.45],[68.822,-15.45],[62.846,0],[66.459,0],[67.432,-2.664],[74.335,-2.664]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[70.884,-12.601],[73.431,-5.513],[68.312,-5.513]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"A","np":5,"cix":2,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[97.935,0],[101.247,0],[101.247,-15.45],[96.615,-15.45],[92.862,-5.814],[89.11,-15.45],[84.5,-15.45],[84.5,0],[87.79,0],[87.79,-11.118],[92.144,0],[93.58,0],[97.935,-11.118]],"c":true},"ix":2},"nm":"M","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"M","np":3,"cix":2,"ix":10,"mn":"ADBE Vector Group","hd":false}],"ip":16.0000162760417,"op":110.000111897786,"st":0,"bm":0},{"ddd":0,"ind":19,"ty":3,"nm":".chris-gannon-lottie-animation","cl":"chris-gannon-lottie-animation","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.45],"y":[1]},"o":{"x":[0.55],"y":[0]},"n":["0p45_1_0p55_0"],"t":72,"s":[0],"e":[-2]},{"i":{"x":[0.45],"y":[1]},"o":{"x":[0.55],"y":[0]},"n":["0p45_1_0p55_0"],"t":74,"s":[-2],"e":[0]},{"t":84.0000854492187}],"ix":10},"p":{"a":0,"k":[518,386,0],"ix":2},"a":{"a":0,"k":[178,146,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":20,"ty":4,"nm":"body","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.197,0.45],"y":[1,1]},"o":{"x":[0.872,0.59],"y":[-0.522,0]},"n":["0p197_1_0p872_-0p522","0p45_1_0p59_0"],"t":97,"s":[216,302],"e":[0,200]},{"t":123.00012512207}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0}]}],"layers":[{"ddd":0,"ind":3,"ty":0,"nm":".chris-gannon-instagram-lottie","cl":"chris-gannon-instagram-lottie","refId":"comp_4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,323,0],"ix":2},"a":{"a":0,"k":[400,300,0],"ix":1},"s":{"a":0,"k":[129,129,100],"ix":6}},"ao":0,"w":800,"h":600,"ip":0,"op":124.000126139323,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"blueToPurple","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[800,600],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"g":{"p":5,"k":{"a":0,"k":[0.007,0.298,0.404,0.851,0.307,0.431,0.308,0.735,0.6,0.565,0.212,0.62,0.8,0.565,0.212,0.62,1,0.565,0.212,0.62,0,1,0.199,1,0.397,1,0.592,0.5,0.788,0],"ix":9}},"s":{"a":0,"k":[-258,-522],"ix":5},"e":{"a":0,"k":[-943,-866],"ix":6},"t":2,"h":{"a":0,"k":18.494,"ix":7},"a":{"a":0,"k":-100.276,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"yellowToOrange","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[800,600],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"g":{"p":7,"k":{"a":0,"k":[0.007,0.984,0.847,0.482,0.193,0.969,0.657,0.325,0.375,0.953,0.467,0.169,0.545,0.882,0.263,0.314,0.715,0.812,0.059,0.459,0.857,0.688,0.135,0.539,1,0.565,0.212,0.62,0,1,0.259,1,0.517,1,0.75,0.5,0.983,0],"ix":9}},"s":{"a":0,"k":[-140,330],"ix":5},"e":{"a":0,"k":[-637,989],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"bg","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[800,600],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.811764705882,0.058823529412,0.458823529412,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":0,"bm":0}]}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "styles":
+ {
+ "ContactNameTextLabel":
+ {
+ "textColor": [ 0, 0, 0, 1 ],
+ "horizontalAlignment": "CENTER",
+ "pointSize": 14
+ },
+
+ "ContactDetailTextLabel":
+ {
+ "textColor": [ 0, 0, 0, 1 ],
+ "multiLine": true,
+ "pointSize": 20
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "styles":
+ {
+ "ContactNameTextLabel":
+ {
+ "textColor": [ 0, 0, 0, 1 ],
+ "horizontalAlignment": "CENTER",
+ "pointSize": 14
+ },
+
+ "ContactDetailTextLabel":
+ {
+ "textColor": [ 0, 0, 0, 1 ],
+ "multiLine": true,
+ "pointSize": 20
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2000-2016 Samsung Electronics Co., Ltd
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+{
+ "styles":
+ {
+ "ConfirmationPopup":{
+ "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/00_popup_bg.9.png"
+ },
+
+ "CustomPopupStyle":{
+ "popupBackgroundImage":"{APPLICATION_RESOURCE_PATH}/images/popup.9.png",
+ "popupBackgroundBorder":[0,4,4,0],
+ "tailUpImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-up.png",
+ "tailDownImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-down.png",
+ "tailLeftImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-left.png",
+ "tailRightImage":"{APPLICATION_RESOURCE_PATH}/images/popup-tail-right.png"
+ },
+
+ "DemoTile":
+ {
+ "states":
+ {
+ "NORMAL":
+ {
+ "color":[0.4, 0.6, 0.9, 0.6],
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture.9.png",
+// TILE_BACKGROUND_ALPHA
+// This shader takes a texture.
+// An alpha discard is performed.
+// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
+ "shader":
+ {
+ "fragmentShader":[
+ " varying mediump vec2 vTexCoord;",
+ " uniform lowp vec4 uColor;",
+ " uniform sampler2D sTexture;",
+ " uniform mediump vec3 uCustomPosition;",
+ "",
+ " void main()",
+ " {",
+ " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
+ " {",
+ " discard;",
+ " }",
+ "",
+ " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
+ " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
+ " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
+ "",
+ " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
+ " }"
+ ]
+ }
+ }
+ }
+ },
+ "FOCUSED":
+ {
+ "color":[0.3, 0.5, 0.8, 0.5],
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/demo-tile-texture-focused.9.png",
+// TILE_BACKGROUND_ALPHA
+// This shader takes a texture.
+// An alpha discard is performed.
+// The shader uses the tiles position within the scroll-view page and the scroll-views rotation position to create a parallax effect.
+ "shader":
+ {
+ "fragmentShader":[
+ " varying mediump vec2 vTexCoord;",
+ " uniform lowp vec4 uColor;",
+ " uniform sampler2D sTexture;",
+ " uniform mediump vec3 uCustomPosition;",
+ "",
+ " void main()",
+ " {",
+ " if( texture2D( sTexture, vTexCoord ).a <= 0.0001 )",
+ " {",
+ " discard;",
+ " }",
+ "",
+ " mediump vec2 wrapTexCoord = vec2( ( vTexCoord.x / 4.0 ) + ( uCustomPosition.x / 4.0 ) + ( uCustomPosition.z / 2.0 ), vTexCoord.y / 4.0 );",
+ " mediump vec4 color = texture2D( sTexture, wrapTexCoord );",
+ " mediump float positionWeight = ( uCustomPosition.y + 0.3 ) * color.r * 2.0;",
+ "",
+ " gl_FragColor = vec4( positionWeight, positionWeight, positionWeight, 0.9 ) * uColor + vec4( uColor.xyz, 0.0 );",
+ " }"
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "FocusActor":
+ {
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/tile-focus.9.png"
+ }
+ }
+ },
+ "DemoTileBorder":
+ {
+ "visuals":
+ {
+ "image":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/item-background.9.png" // TILE_BACKGROUND
+ }
+ }
+ },
+ "TextLabelRosemary":
+ {
+ "fontFamily":"Rosemary"
+ },
+ "TextLabel":
+ {
+ "fontStyle":{"weight":"normal"},
+ "pointSize":18
+ },
+ "LauncherLabel":
+ {
+ "pointSize":18
+ },
+
+ "ToolbarLabel":
+ {
+ "pointSize":18
+ },
+
+ "BuilderLabel":
+ {
+ "pointSize":13
+ },
+
+ "ScrollView":
+ {
+ "overshootEffectColor":"B018"
+ },
+
+ "ImageScalingGroupLabel":
+ {
+ "pointSize":9
+ },
+
+ "ImageScalingButton":
+ {
+ "label":{
+ "pointSize":11
+ }
+ },
+
+ "LauncherBackground":
+ {
+ "background":
+ {
+ "visualType": "GRADIENT",
+ "center": [240, 400],
+ "radius": 932,
+ "units": "USER_SPACE",
+ "stopColor": [[0.247,0.38,0.52,1.0],[0.055,0.18,0.286,1.0]]
+ }
+ },
+//
+// Simple Visuals Application Style section
+//
+ "MyControl":
+ {
+ "states":
+ {
+ "NORMAL":
+ {
+ "visuals":
+ {
+ "iconVisual":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/application-icon-13.png"
+ }
+ }
+ },
+ "FOCUSED":
+ {
+ "visuals":
+ {
+ "iconVisual":
+ {
+ "url":"{APPLICATION_RESOURCE_PATH}/images/application-icon-83.png"
+ }
+ }
+ }
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.5" package="org.tizen.example.Tizen.NUI.Samples" version="1.0.0">
+ <profile name="common" />
+ <ui-application appid="org.tizen.example.Tizen.NUI.Samples"
+ exec="Tizen.NUI.Samples.dll"
+ type="dotnet"
+ multiple="false"
+ taskmanage="true"
+ nodisplay="false"
+ launch_mode="single"
+ api-version="6">
+ <label>Tizen.NUI.Samples</label>
+ <icon>Tizen.NUI.Samples.png</icon>
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+ </ui-application>
+</manifest>