Exemplo n.º 1
0
        private void DestroyBlur()
        {
            _blurController?.Destroy();
            _blurController = null;

            ViewTreeObserver.RemoveOnPreDrawListener(null);
        }
Exemplo n.º 2
0
        public bool OnPreDraw()
        {
            ImageView target;

            if (!m_Target.TryGetTarget(out target) || target.Handle == IntPtr.Zero)
            {
                return(true);
            }

            ViewTreeObserver vto = target.ViewTreeObserver;

            if (!vto.IsAlive)
            {
                return(true);
            }

            int width  = target.MeasuredWidth;
            int height = target.MeasuredHeight;

            if (width <= 0 || height <= 0)
            {
                return(true);
            }

            vto.RemoveOnPreDrawListener(this);

            m_RequestCreator.Unfit().Resize(width, height).Into(target);

            return(true);
        }
Exemplo n.º 3
0
        public bool OnPreDraw()
        {
            ViewTreeObserver.RemoveOnPreDrawListener(this);
            _dimensionsKnown = true;

            if (_tooltipController != null)
            {
                ApplyTooltipPosition();
            }
            return(true);
        }
Exemplo n.º 4
0
        public void Cancel()
        {
            ImageView target;

            if (!m_Target.TryGetTarget(out target))
            {
                return;
            }

            ViewTreeObserver vto = target.ViewTreeObserver;

            if (!vto.IsAlive)
            {
                return;
            }

            vto.RemoveOnPreDrawListener(this);
        }
Exemplo n.º 5
0
        public bool OnPreDraw()
        {
            observer.RemoveOnPreDrawListener(this);
            bool firstAnimation = true;

            int firstVisiblePosition = listview.FirstVisiblePosition;

            for (int i = 0; i < listview.ChildCount; ++i)
            {
                View child    = listview.GetChildAt(i);
                int  position = firstVisiblePosition + i;

                long itemId   = adapter.GetGroupId(position);
                int  startTop = -1;
                if (mItemIdTopMap.ContainsKey(itemId))
                {
                    startTop = mItemIdTopMap[itemId];
                }
                int top = child.Top;
                if (startTop == -1)
                {
                    // Animate new views along with the others. The catch is that they did not
                    // exist in the start state, so we must calculate their starting position
                    // based on whether they're coming in from the bottom (i > 0) or top.
                    int childHeight = child.Height + listview.DividerHeight;
                    startTop = top + (i > 0 ? childHeight : -childHeight);
                }
                int delta = startTop - top;//listView.setEnabled(true);
                if (delta != 0)
                {
                    Runnable endAction = firstAnimation ?
                                         new Runnable(() =>
                    {
                        listview.Enabled = (true);
                    }) : null;
                    firstAnimation = false;
                    moveView(child, 0, 0, delta, 0, endAction);
                }
            }
            mItemIdTopMap.Clear();
            return(true);
        }
Exemplo n.º 6
0
        public bool OnPreDraw()
        {
            observer.RemoveOnPreDrawListener(this);

            View switchView = getViewForID(observeSwitchItemID);

            mTotalOffset += observeDeltaY;

            int switchViewNewTop = switchView.Top;
            int delta            = observeSwitchViewStartTop - switchViewNewTop;

            switchView.TranslationY = delta;

            ObjectAnimator animator = ObjectAnimator.OfFloat(switchView, nameof(this.TranslationY), 0);   //TODO непонтяно с TranslationY

            animator.SetDuration(MOVE_DURATION);
            animator.Start();

            return(true);
        }
Exemplo n.º 7
0
 public bool OnPreDraw()
 {
     observer.RemoveOnPreDrawListener(this);
     activity.StartPostponedEnterTransition();
     return(true);
 }