public virtual void NotifyItemRangeRemoved(IItemSource source, int startIndex, int count) { if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyItemRangeRemoved(source, startIndex, count); } }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (type == DisposeTypes.Explicit) { // call the clear! if (RecycleCache != null) { foreach (RecyclerViewItem item in RecycleCache) { UnrealizeItem(item, false); } RecycleCache.Clear(); } InternalItemsLayouter.Clear(); InternalItemsLayouter = null; ItemsSource = null; ItemTemplate = null; if (InternalItemSource != null) { InternalItemSource.Dispose(); InternalItemSource = null; } // } base.Dispose(type); }
public virtual void NotifyItemInserted(IItemSource source, int startIndex) { if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyItemInserted(source, startIndex); } }
public virtual void NotifyItemRangeMoved(IItemSource source, int fromPosition, int toPosition, int count) { if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyItemRangeMoved(source, fromPosition, toPosition, count); } }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (type == DisposeTypes.Explicit) { // call the clear! if (RecycleCache != null) { ClearCache(); } InternalItemsLayouter?.Clear(); InternalItemsLayouter = null; ItemsSource = null; ItemTemplate = null; if (InternalItemSource != null) { InternalItemSource.Dispose(); InternalItemSource = null; } // } base.Dispose(type); }
public virtual void NotifyItemRangeChanged(IItemSource source, int startRange, int endRange) { if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyItemRangeChanged(source, startRange, endRange); } }
protected override void Dispose(DisposeTypes type) { if (disposed) { return; } if (type == DisposeTypes.Explicit) { disposed = true; // call the clear! if (RecycleCache != null) { foreach (RecyclerViewItem item in RecycleCache) { //ContentContainer.Remove(item); Utility.Dispose(item); } RecycleCache.Clear(); } InternalItemsLayouter.Clear(); InternalItemsLayouter = null; ItemsSource = null; ItemTemplate = null; if (InternalItemSource != null) { InternalItemSource.Dispose(); } // } base.Dispose(type); }
public void NotifyItemRemoved(IItemSource source, int startIndex) { if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyItemRemoved(source, startIndex); } }
public void NotifyItemRangeChanged(IItemSource source, int start, int end) { if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyItemRangeChanged(source, start, end); } }
public void NotifyItemMoved(IItemSource source, int fromPosition, int toPosition) { if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyItemMoved(source, fromPosition, toPosition); } }
/// <inheritdoc/> /// <since_tizen> 9 </since_tizen> public override void OnRelayout(Vector2 size, RelayoutContainer container) { //Console.WriteLine("[NUI] On ReLayout [{0} {0}]", size.X, size.Y); base.OnRelayout(size, container); if (InternalItemsLayouter != null && ItemsSource != null && ItemTemplate != null) { InternalItemsLayouter.Initialize(this); InternalItemsLayouter.RequestLayout(ScrollingDirection == Direction.Horizontal ? ContentContainer.CurrentPosition.X : ContentContainer.CurrentPosition.Y, true); } }
/// <summary> /// On scroll event callback. /// </summary> /// <since_tizen> 9 </since_tizen> protected virtual void OnScrolling(object source, ScrollEventArgs args) { if (args == null) { throw new ArgumentNullException(nameof(args)); } if (!disposed && InternalItemsLayouter != null && ItemsSource != null && ItemTemplate != null) { //Console.WriteLine("[NUI] On Scrolling! {0} => {1}", ScrollPosition.Y, args.Position.Y); InternalItemsLayouter.RequestLayout(ScrollingDirection == Direction.Horizontal ? args.Position.X : args.Position.Y); } }
public virtual void NotifyDataSetChanged() { //Need to update view. if (InternalItemsLayouter != null) { InternalItemsLayouter.NotifyDataSetChanged(); if (ScrollingDirection == Direction.Horizontal) { ContentContainer.SizeWidth = InternalItemsLayouter.CalculateLayoutOrientationSize(); } else { ContentContainer.SizeHeight = InternalItemsLayouter.CalculateLayoutOrientationSize(); } } }
protected override float AdjustTargetPositionOfScrollAnimation(float position) { // Destination is depending on implementation of layout manager. // Get destination from layout manager. return(InternalItemsLayouter.CalculateCandidateScrollPosition(position)); }