private void HidePressedRing() { try { PressedAnimator.SetFloatValues(PressedRingWidth, 0f); PressedAnimator.Start(); } catch (Exception e) { Console.WriteLine(e); } }
public void SetGlow(float glow) { if (!glowAnimationSet.IsRunning || glow == 0f) { if (glowAnimationSet.IsRunning) { glowAnimationSet.Cancel(); } if (currViewTopGlow != null && currViewBottomGlow != null) { if (glow == 0f || currViewTopGlow.Alpha == 0f) { // animate glow in and out glowTopAnimation.SetTarget(currViewTopGlow); glowBottomAnimation.SetTarget(currViewBottomGlow); glowTopAnimation.SetFloatValues(glow); glowBottomAnimation.SetFloatValues(glow); glowAnimationSet.SetupStartValues(); glowAnimationSet.Start(); } else { // set it explicitly in reponse to touches. currViewTopGlow.Alpha = glow; currViewBottomGlow.Alpha = glow; HandleGlowVisibility(); } } } }
public void OnNonCenterPosition(bool animate) { if (animate) { expandAnimator.Cancel(); if (!shrinkAnimator.IsRunning) { shrinkCircleAnimator.SetFloatValues(colorView.CircleRadius, shrinkCircleRadius); shrinkLabelAnimator.SetFloatValues(label.Alpha, ShrinkLabelAlpha); shrinkAnimator.Start(); } } else { shrinkAnimator.Cancel(); colorView.CircleRadius = shrinkCircleRadius; label.Alpha = ShrinkLabelAlpha; } }
public void OnCenterPosition(bool animate) { if (animate) { shrinkAnimator.Cancel(); if (!expandAnimator.IsRunning) { expandCircleAnimator.SetFloatValues(circle.CircleRadius, expandCircleRadius); expandLabelAnimator.SetFloatValues(label.Alpha, ExpandLabelAlpha); expandAnimator.Start(); } } else { expandAnimator.Cancel(); circle.CircleRadius = expandCircleRadius; label.Alpha = ExpandLabelAlpha; } }