summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/LayoutRenderer.cs16
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs14
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/TableViewRenderer.cs2
3 files changed, 15 insertions, 17 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/LayoutRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/LayoutRenderer.cs
index 99e422e..bf36afa 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/LayoutRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/LayoutRenderer.cs
@@ -14,22 +14,6 @@ namespace Xamarin.Forms.Platform.Tizen
{
}
- protected override void UpdateLayout()
- {
- // in case of layouts we need to make sure that the minimum size of the native control is updated
- // this is important in case of ScrollView, when it's content is likely to be wider/higher than the window
- // EFL does not allow control to be larger than the window if it's minimum size is smaller than window dimensions
- ScrollView scrollView = Element.Parent as ScrollView;
- if (scrollView != null)
- {
- Size size = scrollView.ContentSize;
- Control.MinimumWidth = Forms.ConvertToScaledPixel(Math.Max(size.Width, scrollView.Content.Width));
- Control.MinimumHeight = Forms.ConvertToScaledPixel(Math.Max(size.Height, scrollView.Content.Height));
- }
-
- base.UpdateLayout();
- }
-
protected override void OnElementChanged(ElementChangedEventArgs<Layout> e)
{
if (null == Control)
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
index 426ccca..76ce555 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs
@@ -70,6 +70,7 @@ namespace Xamarin.Forms.Platform.Tizen
if (_content != null)
{
Control.SetContent(_content, true);
+ UpdateContentSize();
}
}
@@ -100,6 +101,15 @@ namespace Xamarin.Forms.Platform.Tizen
}
}
+ void UpdateContentSize()
+ {
+ if (_content == null)
+ return;
+
+ _content.MinimumWidth = Forms.ConvertToScaledPixel(Element.ContentSize.Width);
+ _content.MinimumHeight = Forms.ConvertToScaledPixel(Element.ContentSize.Height);
+ }
+
/// <summary>
/// An event raised on element's property change.
/// </summary>
@@ -111,6 +121,10 @@ namespace Xamarin.Forms.Platform.Tizen
{
UpdateOrientation();
}
+ else if (ScrollView.ContentSizeProperty.PropertyName == e.PropertyName)
+ {
+ UpdateContentSize();
+ }
base.OnElementPropertyChanged(sender, e);
}
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/TableViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/TableViewRenderer.cs
index 5912354..c1a3791 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/TableViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/TableViewRenderer.cs
@@ -67,7 +67,7 @@ namespace Xamarin.Forms.Platform.Tizen
void UpdateHasUnevenRows()
{
- //TODO Implement UnevenRows in ListView
+ Control.SetHasUnevenRows(Element.HasUnevenRows);
}
void UpdateRowHeight()