summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-09-21 05:28:58 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:42 (GMT)
commit13dc587597f955faddbc35ec006691e4e219e52b (patch)
treec87899208c59620a54fdd4a79aee24760dcd38eb
parent0226ce604ea3a60716173bd2f2241c224cc0ff31 (diff)
downloadxamarin-forms-13dc587597f955faddbc35ec006691e4e219e52b.zip
xamarin-forms-13dc587597f955faddbc35ec006691e4e219e52b.tar.gz
xamarin-forms-13dc587597f955faddbc35ec006691e4e219e52b.tar.bz2
Fix ScrollView scroll area reset issue
- When the child was removed from Box, Box's MinimumSize was reset to zero and Scroll area was reset (It is EFL rule) - Update MiniumSize when LayoutUpdated was called Change-Id: I69674badb31c1d5a4f26d9069743dcde50761b66
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
index 27914f4..570cb5d 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
@@ -29,7 +29,7 @@ namespace Xamarin.Forms.Platform.Tizen
if (Control == null)
{
///TODO: If 'Watch' target idiom is added, it should be replaced something like Device.Idiom == TargetIdiom.Watch.
- if (Forms.GetProfile() == "wearable" )
+ if (Forms.GetProfile() == "wearable")
{
SetNativeControl(new CircleScroller(Forms.Context.MainWindow));
}
@@ -77,16 +77,31 @@ namespace Xamarin.Forms.Platform.Tizen
{
if (_content != null)
{
+ if (_content is Native.Box contentBox)
+ {
+ contentBox.LayoutUpdated -= OnContentLayoutUpdated;
+ }
Control.SetContent(null, true);
+ _content.Unrealize();
+ _content = null;
}
- _content = Platform.GetOrCreateRenderer(Element.Content).NativeView;
-
- if (_content != null)
+ if (Element.Content != null)
{
+ _content = Platform.GetOrCreateRenderer(Element.Content).NativeView;
+ if (_content is Native.Box contentBox)
+ {
+ contentBox.LayoutUpdated += OnContentLayoutUpdated;
+ }
Control.SetContent(_content, true);
UpdateContentSize();
}
+
+ }
+
+ void OnContentLayoutUpdated(object sender, Native.LayoutEventArgs e)
+ {
+ UpdateContentSize();
}
void UpdateAll()