示例#1
0
 private void HidePressedRing()
 {
     try
     {
         PressedAnimator.SetFloatValues(PressedRingWidth, 0f);
         PressedAnimator.Start();
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
示例#2
0
 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();
             }
         }
     }
 }
示例#3
0
 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;
     }
 }
示例#4
0
 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;
     }
 }