Example #1
0
        public override void dispose()
        {
            D.assert(this._pixels != null);
            if (this.activity != null)
            {
                this.activity.dispose();
                this._activity = null;
            }

            base.dispose();
        }
Example #2
0
        public override void dispose()
        {
            D.assert(_pixels != null);
            if (activity != null)
            {
                activity.dispose();
                _activity = null;
            }

            base.dispose();
        }
        public override void beginActivity(ScrollActivity newActivity)
        {
            this._heldPreviousVelocity = 0.0f;
            if (newActivity == null)
            {
                return;
            }

            D.assert(newActivity.del == this);
            base.beginActivity(newActivity);
            if (this._currentDrag != null)
            {
                this._currentDrag.dispose();
                this._currentDrag = null;
            }

            if (!this.activity.isScrolling)
            {
                this.updateUserScrollDirection(ScrollDirection.idle);
            }
        }
Example #4
0
        public virtual void beginActivity(ScrollActivity newActivity)
        {
            if (newActivity == null)
            {
                return;
            }

            bool wasScrolling, oldIgnorePointer;

            if (this._activity != null)
            {
                oldIgnorePointer = this._activity.shouldIgnorePointer;
                wasScrolling     = this._activity.isScrolling;
                if (wasScrolling && !newActivity.isScrolling)
                {
                    this.didEndScroll();
                }

                this._activity.dispose();
            }
            else
            {
                oldIgnorePointer = false;
                wasScrolling     = false;
            }

            this._activity = newActivity;
            if (oldIgnorePointer != this.activity.shouldIgnorePointer)
            {
                this.context.setIgnorePointer(this.activity.shouldIgnorePointer);
            }

            this.isScrollingNotifier.value = this.activity.isScrolling;
            if (!wasScrolling && this._activity.isScrolling)
            {
                this.didStartScroll();
            }
        }