Initialize SearchBar with a single batch update 51/133451/2
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Mon, 12 Jun 2017 08:54:38 +0000 (10:54 +0200)
committerSeungkeun Lee <sngn.lee@samsung.com>
Tue, 27 Jun 2017 01:35:53 +0000 (01:35 +0000)
Change-Id: I88749ed075b320ad22bf7cb3d9e869d1f6c6dad6
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs
Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs

index 42ada16..f2335f5 100644 (file)
@@ -330,6 +330,16 @@ namespace Xamarin.Forms.Platform.Tizen.Native
                        return new ESize(width, BackgroundHeight);
                }
 
+               internal void BatchBegin()
+               {
+                       _entry.BatchBegin();
+               }
+
+               internal void BatchCommit()
+               {
+                       _entry.BatchCommit();
+               }
+
                /// <summary>
                /// Handles the event triggered by the cancel button being clicked.
                /// </summary>
index 3c9734d..30a2546 100644 (file)
@@ -51,6 +51,8 @@ namespace Xamarin.Forms.Platform.Tizen
                        {
                                Control.TextChanged += SearchBarTextChangedHandler;
                                Control.SearchButtonPressed += SearchButtonPressedHandler;
+
+                               Control.BatchBegin();
                        }
 
                        base.OnElementChanged(e);
@@ -61,6 +63,11 @@ namespace Xamarin.Forms.Platform.Tizen
                        return new Size(136, 65);
                }
 
+               protected override void OnElementReady()
+               {
+                       Control?.BatchCommit();
+               }
+
                /// <summary>
                /// Called upon changing of Xamarin widget's cancel button color property.
                /// Converts current Color to ElmSharp.Color instance and sets it in the underlying Xamarin.Forms.Platform.Tizen.Native widget.