Exemplo n.º 1
0
 public virtual void NotifyItemRangeRemoved(IItemSource source, int startIndex, int count)
 {
     if (InternalItemsLayouter != null)
     {
         InternalItemsLayouter.NotifyItemRangeRemoved(source, startIndex, count);
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public virtual void NotifyItemInserted(IItemSource source, int startIndex)
 {
     if (InternalItemsLayouter != null)
     {
         InternalItemsLayouter.NotifyItemInserted(source, startIndex);
     }
 }
Exemplo n.º 4
0
 public virtual void NotifyItemRangeMoved(IItemSource source, int fromPosition, int toPosition, int count)
 {
     if (InternalItemsLayouter != null)
     {
         InternalItemsLayouter.NotifyItemRangeMoved(source, fromPosition, toPosition, count);
     }
 }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 public virtual void NotifyItemRangeChanged(IItemSource source, int startRange, int endRange)
 {
     if (InternalItemsLayouter != null)
     {
         InternalItemsLayouter.NotifyItemRangeChanged(source, startRange, endRange);
     }
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
 public void NotifyItemRemoved(IItemSource source, int startIndex)
 {
     if (InternalItemsLayouter != null)
     {
         InternalItemsLayouter.NotifyItemRemoved(source, startIndex);
     }
 }
Exemplo n.º 9
0
 public void NotifyItemRangeChanged(IItemSource source, int start, int end)
 {
     if (InternalItemsLayouter != null)
     {
         InternalItemsLayouter.NotifyItemRangeChanged(source, start, end);
     }
 }
Exemplo n.º 10
0
 public void NotifyItemMoved(IItemSource source, int fromPosition, int toPosition)
 {
     if (InternalItemsLayouter != null)
     {
         InternalItemsLayouter.NotifyItemMoved(source, fromPosition, toPosition);
     }
 }
Exemplo n.º 11
0
 /// <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);
     }
 }
Exemplo n.º 12
0
 /// <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);
     }
 }
Exemplo n.º 13
0
 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();
         }
     }
 }
Exemplo n.º 14
0
 protected override float AdjustTargetPositionOfScrollAnimation(float position)
 {
     // Destination is depending on implementation of layout manager.
     // Get destination from layout manager.
     return(InternalItemsLayouter.CalculateCandidateScrollPosition(position));
 }