private void DestroyBlur() { _blurController?.Destroy(); _blurController = null; ViewTreeObserver.RemoveOnPreDrawListener(null); }
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); }
public bool OnPreDraw() { ViewTreeObserver.RemoveOnPreDrawListener(this); _dimensionsKnown = true; if (_tooltipController != null) { ApplyTooltipPosition(); } return(true); }
public void Cancel() { ImageView target; if (!m_Target.TryGetTarget(out target)) { return; } ViewTreeObserver vto = target.ViewTreeObserver; if (!vto.IsAlive) { return; } vto.RemoveOnPreDrawListener(this); }
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); }
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); }
public bool OnPreDraw() { observer.RemoveOnPreDrawListener(this); activity.StartPostponedEnterTransition(); return(true); }