Precreate the IndicatorView (#251) tizen tizen_5.5
author유리나/Common Platform Lab(SR)/Staff Engineer/삼성전자 <rina6350.you@samsung.com>
Tue, 23 Jun 2020 05:17:21 +0000 (14:17 +0900)
committer윤정현/Common Platform Lab(SR)/Staff Engineer/삼성전자 <jh0506.yun@samsung.com>
Tue, 23 Jun 2020 05:17:21 +0000 (14:17 +0900)
src/XSF/Xamarin.Forms.Platform.Tizen/Native/NativeFactory.cs
src/XSF/Xamarin.Forms.Platform.Tizen/Renderers/IndicatorViewRenderer.cs
src/XSF/ibc/XSF.ibc

index b2077a1..e101f8d 100644 (file)
@@ -13,6 +13,7 @@ namespace Xamarin.Forms.Platform.Tizen.Native
                static List<EditfieldEntry> editfieldEntrys = new List<EditfieldEntry>();
                static List<Canvas> canvases = new List<Canvas>();
                static List<Page> pages = new List<Page>();
+               static List<IndicatorView> indicatorViews = new List<IndicatorView>();
                static Dictionary<CircleSurface, Watch.WatchListView> watchListviews = new Dictionary<CircleSurface, Watch.WatchListView>();
                static Dictionary<CircleSurface, Watch.WatchScroller> watchScrollers = new Dictionary<CircleSurface, Watch.WatchScroller>();
                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();
index f013917..99c891a 100644 (file)
@@ -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)
                        {
index c06b642..a11d1be 100644 (file)
Binary files a/src/XSF/ibc/XSF.ibc and b/src/XSF/ibc/XSF.ibc differ