Example #1
0
        protected RecycledDataViewAdapter(RecyclerView owner, ICollectionDataView <T> dataView)
        {
            this.dataView = dataView;
            this.dataView.CollectionChanged += OnCollectionChanged;
            this.dataView.IsLoadingChanged  += OnLoading;
            this.dataView.HasMoreChanged    += OnHasMore;
            Owner = owner;

            HasStableIds = false;
        }
Example #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (dataView != null)
                {
                    dataView.CollectionChanged -= OnCollectionChanged;
                    dataView.IsLoadingChanged  -= OnLoading;
                    dataView.HasMoreChanged    -= OnHasMore;

                    dataView.Dispose();
                    dataView = null;
                }
            }
            base.Dispose(disposing);
        }