summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen
diff options
context:
space:
mode:
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>2016-12-21 07:28:05 (GMT)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>2016-12-21 07:29:33 (GMT)
commitf11633b67dad5950ceb83935c17f1bfd2305dbeb (patch)
treeddb0461187672f578dd168612076b0a030f25552 /Xamarin.Forms.Platform.Tizen
parent82202551185931829d9ea100ed4bef0c3de83b85 (diff)
downloadxamarin-forms-f11633b67dad5950ceb83935c17f1bfd2305dbeb.zip
xamarin-forms-f11633b67dad5950ceb83935c17f1bfd2305dbeb.tar.gz
xamarin-forms-f11633b67dad5950ceb83935c17f1bfd2305dbeb.tar.bz2
Homogenous mode should be set to false if grouping is enabledrefs/changes/75/106275/1
Change-Id: I01327d4c0be6847445c4711d5c4cb6f60f3ba6a9 Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/ListView.cs35
1 files changed, 33 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/ListView.cs b/Xamarin.Forms.Platform.Tizen/Native/ListView.cs
index d5531dc..e932a28 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/ListView.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/ListView.cs
@@ -85,10 +85,32 @@ namespace Xamarin.Forms.Platform.Tizen.Native
GenItemClass _headerFooterItemClass = null;
/// <summary>
+ /// Indicates if the list view has uneven rows.
+ /// </summary>
+ bool _hasUnevenRows = false;
+
+ /// <summary>
+ /// Indicates if grouping in the list view is enabled.
+ /// </summary>
+ bool _isGroupingEnabled = false;
+
+ /// <summary>
/// Gets or sets a value indicating whether this instance has grouping enabled.
/// </summary>
/// <value><c>true</c> if this instance has grouping enabled.</value>
- public bool IsGroupingEnabled { get; set; }
+ public bool IsGroupingEnabled
+ {
+ get
+ {
+ return _isGroupingEnabled;
+ }
+
+ set
+ {
+ _isGroupingEnabled = value;
+ UpdateHomogeneousMode();
+ }
+ }
/// <summary>
/// Constructor of ListView native control.
@@ -124,7 +146,8 @@ namespace Xamarin.Forms.Platform.Tizen.Native
/// <param name="hasUnevenRows">If <c>true</c>, the list will allow uneven sizes for its rows.</param>
public void SetHasUnevenRows(bool hasUnevenRows)
{
- Homogeneous = !hasUnevenRows;
+ _hasUnevenRows = hasUnevenRows;
+ UpdateHomogeneousMode();
UpdateRealizedItems();
}
@@ -597,5 +620,13 @@ namespace Xamarin.Forms.Platform.Tizen.Native
}
return _headerFooterItemClass;
}
+
+ /// <summary>
+ /// Updates the homogeneous mode of the list view.
+ /// </summary>
+ void UpdateHomogeneousMode()
+ {
+ Homogeneous = !_hasUnevenRows && !_isGroupingEnabled;
+ }
}
}