summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>2017-06-12 10:54:38 +0200
committerKangho Hur <kangho.hur@samsung.com>2017-07-10 11:11:28 +0900
commitad9499a98e174d75fcefc0676ef9f5a64ae1e6dd (patch)
treebffd55b1f0e134f8fae193ef78a3bcdc57d29d49
parent3d499e232ec240e87ca5e8a1a5cf6ab2f87ea4ea (diff)
downloadxamarin-forms-ad9499a98e174d75fcefc0676ef9f5a64ae1e6dd.tar.gz
xamarin-forms-ad9499a98e174d75fcefc0676ef9f5a64ae1e6dd.tar.bz2
xamarin-forms-ad9499a98e174d75fcefc0676ef9f5a64ae1e6dd.zip
Initialize SearchBar with a single batch update
Change-Id: I88749ed075b320ad22bf7cb3d9e869d1f6c6dad6 Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs10
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs7
2 files changed, 17 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs b/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs
index 42ada16e..f2335f51 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/SearchBar.cs
@@ -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>
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs
index 3c9734db..30a2546c 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs
@@ -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.