summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-09-21 14:28:58 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 13:34:42 +0900
commit13dc587597f955faddbc35ec006691e4e219e52b (patch)
treec87899208c59620a54fdd4a79aee24760dcd38eb /Xamarin.Forms.Platform.Tizen
parent0226ce604ea3a60716173bd2f2241c224cc0ff31 (diff)
downloadxamarin-forms-13dc587597f955faddbc35ec006691e4e219e52b.tar.gz
xamarin-forms-13dc587597f955faddbc35ec006691e4e219e52b.tar.bz2
xamarin-forms-13dc587597f955faddbc35ec006691e4e219e52b.zip
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
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen')
-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 27914f4b..570cb5da 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()