width + itemMargin.Start + itemMargin.End:
height + itemMargin.Top + itemMargin.Bottom;
groupFooterMargin = new Extents(itemMargin);
-
+
colView.UnrealizeItem(groupFooter);
}
}
//Console.WriteLine("[NUI] itemsView [{0},{1}] [{2},{3}]", colView.Size.Width, colView.Size.Height, colView.ContentContainer.Size.Width, colView.ContentContainer.Size.Height);
- // 1. Set First/Last Visible Item Index.
+ // 1. Set First/Last Visible Item Index.
(int start, int end) = FindVisibleItems(visibleArea);
FirstVisible = start;
LastVisible = end;
{
currentSize = StepCandidate;
}
-
+
}
ScrollContentSize -= currentSize;
float offset = 0F;
(topInScreenIndex, offset) = FindTopItemInScreen();
*/
-
+
// Move can only happen in it's own groups.
// so there will be no changes in position, startIndex in ohter groups.
// check visible item and update indexs.
int startGroup = (diff > 0? fromParentIndex: toParentIndex);
int endGroup = (diff > 0? toParentIndex: fromParentIndex);
-
+
for (int i = startGroup; i <= endGroup; i++)
{
if (i == toParentIndex) continue;
}
internal override (float Width, float Height) GetItemSize(int index)
- {
+ {
return (sizeCandidate.Width - CandidateMargin.Start - CandidateMargin.End,
sizeCandidate.Height - CandidateMargin.Top - CandidateMargin.Bottom);
}
RequestLayout(scrollPosition, force);
return false;
});
+ requestLayoutTimer.Start();
}
private RecyclerViewItem GetVisibleItem(int index)
groupFooterSize = IsHorizontal?
width + itemMargin.Start + itemMargin.End:
height + itemMargin.Top + itemMargin.Bottom;
- groupFooterMargin = new Extents(itemMargin);
+ groupFooterMargin = new Extents(itemMargin);
colView.UnrealizeItem(groupFooter);
}
}
else isGrouped = false;
bool failed = false;
+
//Final Check of FirstIndex
while (colView.InternalItemSource.IsHeader(firstIndex) ||
colView.InternalItemSource.IsGroupHeader(firstIndex) ||
colView.InternalItemSource.IsGroupFooter(firstIndex))
{
- if (colView.InternalItemSource.IsFooter(firstIndex))
+ if (colView.InternalItemSource.IsFooter(firstIndex)
+ || ((colView.InternalItemSource.Count - 1) <= firstIndex))
{
StepCandidate = 0F;
failed = true;
StepCandidate = IsHorizontal?
width + itemMargin.Start + itemMargin.End:
height + itemMargin.Top + itemMargin.Bottom;
- CandidateMargin = new Extents(itemMargin);
+ CandidateMargin = new Extents(itemMargin);
if (StepCandidate == 0) StepCandidate = 1; //????
colView.UnrealizeItem(sizeDeligate);
PrevScrollPosition + (IsHorizontal? colView.Size.Width : colView.Size.Height)
);
- // 1. Set First/Last Visible Item Index.
+ // 1. Set First/Last Visible Item Index.
(int start, int end) = FindVisibleItems(visibleArea);
FirstVisible = start;
LastVisible = end;
float offset = 0F;
(topInScreenIndex, offset) = FindTopItemInScreen();
*/
-
+
// 1. Handle MeasureAll
/*
if (colView.SizingStrategy == ItemSizingStrategy.MeasureAll)
//Need To Implement
}
*/
-
+
// Move can only happen in it's own groups.
// so there will be no changes in position, startIndex in ohter groups.
// check visible item and update indexs.
int startGroup = (diff > 0? fromParentIndex: toParentIndex);
int endGroup = (diff > 0? toParentIndex: fromParentIndex);
-
+
for (int i = startGroup; i <= endGroup; i++)
{
if (i == toParentIndex) continue;
- CandidateMargin.Start - CandidateMargin.End,
(IsHorizontal? (int)colView.Size.Height - Padding.Top - Padding.Bottom: (int)StepCandidate)
- CandidateMargin.Top - CandidateMargin.Bottom);
- }
+ }
}
private void DelayedRequestLayout(float scrollPosition , bool force = true)
RequestLayout(scrollPosition, force);
return false;
});
+ requestLayoutTimer.Start();
}
/*
return groupFooterSize;
else
return StepCandidate;
- }
+ }
}
private void UpdatePosition(int index)