From 77c9cf3ae78db1b8e7f73e9c2d4fa209a53a684a Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Tue, 4 Apr 2017 11:12:16 +0900 Subject: [PATCH] temporary fix of crash problem Change-Id: I553ba5c8d9d41c36937c6fa10089015fe01f8ba7 Signed-off-by: dongsug.song --- .../NUISamples/NUISamples.TizenTV/examples/Main.cs | 6 ++++-- .../NUISamples.TizenTV/examples/control-dashboard.cs | 16 ++++++++-------- .../NUISamples.TizenTV/examples/view-navi-property.cs | 4 ++-- Tizen.NUI/src/internal/DisposeQueue.cs | 7 ++++++- Tizen.NUI/src/public/CustomView/VisualView.cs | 9 ++++++--- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs index 442c35f..0f96533 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs @@ -14,7 +14,7 @@ namespace NUISamples.TizenTV.examples [STAThread] static void Main(string[] args) { - new VisualsUsingCustomView.VisualsExample().Run(args); //o + //new VisualsUsingCustomView.VisualsExample().Run(args); //o //new ControlDashboard.Example().Run(args); //o //new DatePickerTest.Example().Run(args); //o //new HelloTest.Example().Run(args); //o @@ -30,7 +30,9 @@ namespace NUISamples.TizenTV.examples //new DatePickerUsingJson.Example().Run(args); //o //new DaliTest.Example().Run(args); //o //new FirstScreen.FirstScreenApp().Run(args); //o - + //new MyCSharpExample.Example().Run(args); //o + new FirstScreen.FirstScreenApp().Run(args); //o + //new MyCSharpExample.Example().Run(args); //o } } diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs index f0afd74..1c5c348 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs @@ -83,7 +83,7 @@ namespace ControlDashboard topLabel.WidthResizePolicy = ResizePolicyType.FillToParent; topLabel.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent; topLabel.AnchorPoint = AnchorPoint.TopCenter; - //topLabel.ParentOrigin = ParentOrigin.TopCenter; + topLabel.ParentOrigin = ParentOrigin.TopCenter; topLabel.SetSizeModeFactor(new Vector3(0.0f, 0.1f, 0.0f)); topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f); topLabel.TextColor = Color.White; @@ -101,7 +101,7 @@ namespace ControlDashboard _contentContainer.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent; _contentContainer.SetSizeModeFactor(new Vector3(0.0f, 0.9f, 0.0f)); _contentContainer.AnchorPoint = AnchorPoint.BottomCenter; - //_contentContainer.ParentOrigin = ParentOrigin.BottomCenter; + _contentContainer.ParentOrigin = ParentOrigin.BottomCenter; _contentContainer.Position = new Position(0, _stage.Size.Height * 0.1f, 0); _contentContainer.SetRelativeHeight(0, 0.07f); _contentContainer.SetRelativeHeight(1, 0.26f); @@ -316,7 +316,7 @@ namespace ControlDashboard { PushButton button = new PushButton(); button.LabelText = "Popup"; - //button.ParentOrigin = ParentOrigin.Center; + button.ParentOrigin = ParentOrigin.Center; button.AnchorPoint = AnchorPoint.Center; button.MaximumSize = new Size2D(150, 100); _popup = CreatePopup(); @@ -345,7 +345,7 @@ namespace ControlDashboard { PushButton button = new PushButton(); button.LabelText = "Toast"; - //button.ParentOrigin = ParentOrigin.Center; + button.ParentOrigin = ParentOrigin.Center; button.AnchorPoint = AnchorPoint.Center; button.Clicked += (obj, ee) => { @@ -391,25 +391,25 @@ namespace ControlDashboard footer.WidthResizePolicy = ResizePolicyType.FillToParent; footer.HeightResizePolicy = ResizePolicyType.Fixed; footer.Size = new Size(0.0f, 80.0f, 0.0f); - //footer.ParentOrigin = ParentOrigin.Center; + footer.ParentOrigin = ParentOrigin.Center; footer.AnchorPoint = AnchorPoint.Center; PushButton okButton = CreateOKButton(); - //okButton.ParentOrigin = ParentOrigin.Center; + okButton.ParentOrigin = ParentOrigin.Center; okButton.AnchorPoint = AnchorPoint.Center; okButton.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent; okButton.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent; okButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f)); PushButton cancelButton = CreateCancelButton(); - //cancelButton.ParentOrigin = ParentOrigin.Center; + cancelButton.ParentOrigin = ParentOrigin.Center; cancelButton.AnchorPoint = AnchorPoint.Center; cancelButton.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent; cancelButton.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent; cancelButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f)); TableView controlLayout = new TableView(1, 2); - //controlLayout.ParentOrigin = ParentOrigin.Center; + controlLayout.ParentOrigin = ParentOrigin.Center; controlLayout.AnchorPoint = AnchorPoint.Center; controlLayout.WidthResizePolicy = ResizePolicyType.FillToParent; controlLayout.HeightResizePolicy = ResizePolicyType.FillToParent; diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs index 2de61ba..bdc54aa 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/view-navi-property.cs @@ -64,8 +64,8 @@ namespace MyCSharpExample private void Instance_Touch(object sender, Stage.TouchEventArgs e) { - Tizen.Log.Debug("NUI", "stage touched! set key focus as lastFocusedView!"); - FocusManager.Instance.SetCurrentFocusView(lastFocusedView); + Tizen.Log.Debug("NUI", "stage touched! set key focus as view[0]!"); + FocusManager.Instance.SetCurrentFocusView(view[0]); } private bool FocusNavigationSample_KeyEvent(object source, View.KeyEventArgs e) diff --git a/Tizen.NUI/src/internal/DisposeQueue.cs b/Tizen.NUI/src/internal/DisposeQueue.cs index a7004a5..f3b2016 100755 --- a/Tizen.NUI/src/internal/DisposeQueue.cs +++ b/Tizen.NUI/src/internal/DisposeQueue.cs @@ -18,9 +18,10 @@ namespace Tizen.NUI private static readonly DisposeQueue _disposableQueue = new DisposeQueue(); private List _disposables = new List(); private Object _listLock = new object(); + /* temporary removal because of crash issue. this will be fixed later. 2017-04-04 private EventThreadCallback _eventThreadCallback; private EventThreadCallback.CallbackDelegate _disposeQueueProcessDisposablesDelegate; - + */ private DisposeQueue() { } @@ -36,8 +37,10 @@ namespace Tizen.NUI public void Initialize() { + /* temporary removal because of crash issue. this will be fixed later. 2017-04-04 _disposeQueueProcessDisposablesDelegate = new EventThreadCallback.CallbackDelegate(ProcessDisposables); _eventThreadCallback = new EventThreadCallback(_disposeQueueProcessDisposablesDelegate); + */ } public void Add(IDisposable disposable) @@ -47,7 +50,9 @@ namespace Tizen.NUI _disposables.Add(disposable); } + /* temporary removal because of crash issue. this will be fixed later. 2017-04-04 _eventThreadCallback.Trigger(); + */ } private void ProcessDisposables() diff --git a/Tizen.NUI/src/public/CustomView/VisualView.cs b/Tizen.NUI/src/public/CustomView/VisualView.cs index e685890..f5cf172 100755 --- a/Tizen.NUI/src/public/CustomView/VisualView.cs +++ b/Tizen.NUI/src/public/CustomView/VisualView.cs @@ -129,13 +129,16 @@ namespace Tizen.NUI } /// - /// A visual view control for user add any visual to it. + /// Get the total number of Visuals which are added by users /// - /// The number of visuals. - public int NumberOfVisuals() + public int NumberOfVisuals + { + get { return _visualDictionary.Count; } + } + /// /// Remove all visuals of visual view. -- 2.7.4