summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Native
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-01-25 10:03:23 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 13:34:28 +0900
commit1085b49e24618e01bccdbfa00c2ab7810e59be96 (patch)
treed04c7e60594dace4d55c09edb906beffcf94c03e /Xamarin.Forms.Platform.Tizen/Native
parent7db0e5771cd4dd51bcd46d4bb2c6184d4f7064b2 (diff)
downloadxamarin-forms-1085b49e24618e01bccdbfa00c2ab7810e59be96.tar.gz
xamarin-forms-1085b49e24618e01bccdbfa00c2ab7810e59be96.tar.bz2
xamarin-forms-1085b49e24618e01bccdbfa00c2ab7810e59be96.zip
Fix wrong Group Header handling
- Set up all properties of ItemContext before add GenList Change-Id: I88740b2a6e0b65c4bf3467b3c363804491078708
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Native')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/ListView.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/ListView.cs b/Xamarin.Forms.Platform.Tizen/Native/ListView.cs
index f8b09fa0..a94282ab 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/ListView.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/ListView.cs
@@ -463,9 +463,13 @@ namespace Xamarin.Forms.Platform.Tizen.Native
{
Cell groupCell = groupList.HeaderContent;
CellRenderer groupRenderer = GetCellRenderer(groupCell, true);
+
ItemContext groupItemContext = new ItemContext();
groupItemContext.Cell = groupCell;
groupItemContext.Renderer = groupRenderer;
+ groupItemContext.IsGroupItem = true;
+ groupItemContext.ListOfSubItems = groupList;
+ _itemContextList.Add(groupItemContext);
if (beforeCell != null)
{
@@ -479,11 +483,8 @@ namespace Xamarin.Forms.Platform.Tizen.Native
(groupItemContext.Item as GenListItem).SelectionMode = GenListSelectionMode.None;
groupItemContext.Item.IsEnabled = groupCell.IsEnabled;
- groupItemContext.IsGroupItem = true;
-
- groupItemContext.ListOfSubItems = groupList;
groupItemContext.Item.Deleted += ItemDeletedHandler;
- _itemContextList.Add(groupItemContext);
+
}
/// <summary>
@@ -502,6 +503,7 @@ namespace Xamarin.Forms.Platform.Tizen.Native
ItemContext itemContext = new ItemContext();
itemContext.Cell = cell;
itemContext.Renderer = renderer;
+ _itemContextList.Add(itemContext);
if (IsGroupingEnabled && groupCell != null)
{
@@ -522,11 +524,10 @@ namespace Xamarin.Forms.Platform.Tizen.Native
(itemContext.Item as GenListItem).SelectionMode = GenListSelectionMode.Always;
itemContext.Item.IsEnabled = cell.IsEnabled;
+ itemContext.Item.Deleted += ItemDeletedHandler;
cell.PropertyChanged += OnCellPropertyChanged;
(cell as ICellController).ForceUpdateSizeRequested += OnForceUpdateSizeRequested;
- itemContext.Item.Deleted += ItemDeletedHandler;
- _itemContextList.Add(itemContext);
}
/// <summary>