3 using Tizen.NUI.BaseComponents;
5 namespace NUISimpleCallee
7 class Program : NUIApplication
9 protected override void OnCreate()
17 Window.Instance.KeyEvent += OnKeyEvent;
18 Window.Instance.TouchEvent += OnTouchEvent;
19 Window.Instance.BackgroundColor = Color.Yellow;
21 TextLabel text = new TextLabel("Callee");
22 text.HorizontalAlignment = HorizontalAlignment.Center;
23 text.VerticalAlignment = VerticalAlignment.Center;
24 text.TextColor = Color.Red;
25 text.PointSize = 25.0f;
26 text.HeightResizePolicy = ResizePolicyType.FillToParent;
27 text.WidthResizePolicy = ResizePolicyType.FillToParent;
28 Window.Instance.GetDefaultLayer().Add(text);
30 TransitionOptions = new TransitionOptions(GetDefaultWindow());
31 TransitionOptions.EnableTransition = true;
33 TransitionOptions.CallerScreenShown += TransitionOptions_CallerScreenShown;
34 TransitionOptions.CallerScreenHidden += TransitionOptions_CallerScreenHidden;
37 private void TransitionOptions_CallerScreenShown(object sender, EventArgs e)
39 Tizen.Log.Error("MYLOG", "Shown");
42 private void TransitionOptions_CallerScreenHidden(object sender, EventArgs e)
44 Tizen.Log.Error("MYLOG", "Hidden");
47 private void OnTouchEvent(object sender, Window.TouchEventArgs e)
49 if (e.Touch.GetState(0) == PointStateType.Up)
51 //Window.Instance.Hide();
56 public void OnKeyEvent(object sender, Window.KeyEventArgs e)
58 if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
64 static void Main(string[] args)
66 var app = new Program();