From: 유리나/Common Platform Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 23 Jun 2020 05:17:21 +0000 (+0900) Subject: Precreate the IndicatorView (#251) X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen;p=platform%2Fcore%2Fcsapi%2Fxsf.git Precreate the IndicatorView (#251) --- diff --git a/src/XSF/Xamarin.Forms.Platform.Tizen/Native/NativeFactory.cs b/src/XSF/Xamarin.Forms.Platform.Tizen/Native/NativeFactory.cs index b2077a1..e101f8d 100644 --- a/src/XSF/Xamarin.Forms.Platform.Tizen/Native/NativeFactory.cs +++ b/src/XSF/Xamarin.Forms.Platform.Tizen/Native/NativeFactory.cs @@ -13,6 +13,7 @@ namespace Xamarin.Forms.Platform.Tizen.Native static List editfieldEntrys = new List(); static List canvases = new List(); static List pages = new List(); + static List indicatorViews = new List(); static Dictionary watchListviews = new Dictionary(); static Dictionary watchScrollers = new Dictionary(); const int hfrequency = 20; @@ -52,6 +53,10 @@ namespace Xamarin.Forms.Platform.Tizen.Native var editfield = new EditfieldEntry(preloadedWindow.Window); editfield.Hide(); editfieldEntrys.Add(editfield); + + var indicatorView = new IndicatorView(preloadedWindow.Window); + indicatorView.Hide(); + indicatorViews.Add(indicatorView); } var listview = new Watch.WatchListView(preloadedWindow.Window, preloadedWindow.BaseCircleSurface); @@ -125,6 +130,16 @@ namespace Xamarin.Forms.Platform.Tizen.Native } return new Page(Forms.NativeParent); } + else if (type == typeof(IndicatorView)) + { + if (indicatorViews.Count >= 1) + { + IndicatorView native = indicatorViews[indicatorViews.Count - 1]; + indicatorViews.Remove(native); + return native; + } + return new IndicatorView(Forms.NativeParent); + } else if (type == typeof(Watch.WatchListView)) { if (watchListviews.ContainsKey(surface)) @@ -186,6 +201,12 @@ namespace Xamarin.Forms.Platform.Tizen.Native } pages.Clear(); + foreach (var native in indicatorViews) + { + native.Unrealize(); + } + indicatorViews.Clear(); + foreach (var item in watchListviews) { item.Value.Unrealize(); diff --git a/src/XSF/Xamarin.Forms.Platform.Tizen/Renderers/IndicatorViewRenderer.cs b/src/XSF/Xamarin.Forms.Platform.Tizen/Renderers/IndicatorViewRenderer.cs index f013917..99c891a 100644 --- a/src/XSF/Xamarin.Forms.Platform.Tizen/Renderers/IndicatorViewRenderer.cs +++ b/src/XSF/Xamarin.Forms.Platform.Tizen/Renderers/IndicatorViewRenderer.cs @@ -14,7 +14,12 @@ namespace Xamarin.Forms.Platform.Tizen { if (Control == null) { - SetNativeControl(new Native.IndicatorView(Forms.NativeParent)); + var native = Native.NativeFactory.GetNativeControl(typeof(Native.IndicatorView)) as Native.IndicatorView; + + if (Device.Idiom == TargetIdiom.Watch) + native.Style = "circle"; + + SetNativeControl(native); } if (e.NewElement != null) { diff --git a/src/XSF/ibc/XSF.ibc b/src/XSF/ibc/XSF.ibc index c06b642..a11d1be 100644 Binary files a/src/XSF/ibc/XSF.ibc and b/src/XSF/ibc/XSF.ibc differ