protected override void Prepare(View view) { AnimatorAgent.PlayTogether( ObjectAnimator.OfFloat(view, "scaleX", 1, 0.9f, 0.9f, 1.1f, 1.1f, 1.1f, 1.1f, 1.1f, 1.1f, 1), ObjectAnimator.OfFloat(view, "scaleY", 1, 0.9f, 0.9f, 1.1f, 1.1f, 1.1f, 1.1f, 1.1f, 1.1f, 1), ObjectAnimator.OfFloat(view, "rotation", 0, -3, -3, 3, -3, 3, -3, 3, -3, 0) ); }
private void CreateAnimation() { ObjectAnimator anim = ObjectAnimator.OfInt(pBar, "progress", Element.Minimun, Element.Value); anim.SetDuration(Element.AnimationDuration); anim.SetInterpolator(new DecelerateInterpolator()); anim.Start(); }
public override void Update() { if (ObjectAnimator.Get((Component)Camera.get_main()).isMoving) { return; } this.ActivateNext(); }
private void OnTriggerExit2D(Collider2D other) { if (other.CompareTag("Ghost")) { ObjectAnimator.SetBool("GhostProgramming", false); developerStates.GhostOnPc = false; } }
public override void Use() { developerStates.GhostOnPc = true; ObjectAnimator.SetBool("GhostProgramming", true); gamePercentage.IncreaseGamePercentage(0.1f); }
protected override void Prepare(View view) { AnimatorAgent.PlayTogether( ObjectAnimator.OfFloat(view, "scaleX", 0.45f, 1), ObjectAnimator.OfFloat(view, "scaleY", 0.45f, 1), ObjectAnimator.OfFloat(view, "alpha", 0, 1) ); }
public Animator GetPausePlayAnimator() { Animator anim = ObjectAnimator.OfFloat(this, "progress", mIsPlay ? 1 : 0, mIsPlay ? 0 : 1); anim.AnimationStart += (e, a) => mIsPlay = !mIsPlay; return(anim); }
/// <summary> /// Animates the note from the bottom to the top, and positions it depending on its fret position. /// </summary> /// <returns>Returns the animation of this NoteRepresentation.</returns> public ObjectAnimator CreateNoteAnimation() { const float TRANSPARENT = 0; DisplayMetrics screenDimensions = Generic.GetScreenDimentions(_currentActivity); FretMetrics fretMetrics = GetFretMetrics(_note.Position.Fret); //TODO: Add string positions as well. //Set initial location. _noteCircle.SetX(fretMetrics.GetHorizontalCenter() - _noteCircle.Width / 2); _noteCircle.SetY(screenDimensions.HeightPixels); int Y_dest = fretMetrics.GetVerticalCenter() - _noteCircle.Height / 2; ObjectAnimator objAnim = ObjectAnimator.OfFloat(_noteCircle, "Y", Y_dest); objAnim.SetDuration((long)_note.Duration); objAnim.StartDelay = (long)_note.Delay; objAnim.AnimationEnd += (object sender, EventArgs e) => { ObjectAnimator objAnimFadeOut = ObjectAnimator.OfFloat(_noteCircle, "Alpha", TRANSPARENT); objAnimFadeOut.SetDuration((long)_note.Duration); objAnimFadeOut.Start(); //Start capturing of note's sound input. OnNoteArraival(this, new OnNoteArraivalArgs(_note.Hertz)); objAnimFadeOut.AnimationEnd += (object sender2, EventArgs e2) => { //Note's sound input window closes. OnNoteGone(this, new EventArgs()); }; }; return(objAnim); /*PropertyViewAnimator pva = new PropertyViewAnimator(_noteCircle); * //Start * pva.Animate() * .SetDuration((int)(_note.Duration)) * .SetStartDelay((int)(_note.Delay)) * .Y(Y_dest_start) * .WithEndAction(new Runnable(() => { * //Start capturing of note's sound input. * //Raise StartNoteCapture event. * pva.Alpha(transparent).WithEndAction(new Runnable(() => { * //Note's sound input window closes. * //Raise EndNoteCapture event. * })); * })); * //Dilemma: * //Middle and End. * //But the animation does not happen here, it happens in AnimatorSet. * * return pva;*/ }
private ObjectAnimator YAnimator(long duration, EasingFunction easing) { ObjectAnimator animatorY = ObjectAnimator.OfFloat(this, "phaseY", 0f, 1f); animatorY.SetInterpolator(new AnimationInterpolator(easing)); animatorY.SetDuration(duration); return(animatorY); }
internal void AnimateHide(string name, Action <string> onEvaluated) { var title = collapsingToolbar.Title; var anim = ObjectAnimator.OfObject(collapsingToolbar, "title", new CharSequenceEvaluator(onEvaluated), title, name); anim.SetDuration(600); anim.Start(); }
public void AnimateOutView(View target, Point point, long duration, Action onEndListener) { var oa = ObjectAnimator.OfFloat(target, Alpha, Invisible); oa.SetDuration(duration); oa.AnimationEnd += (s, e) => onEndListener(); oa.Start(); }
public void StartTranslateBottomAnimation() { float translationYFrom = -(260 * parentWidth) / 700; float translationYTo = (360 * parentWidth) / 700; ObjectAnimator translationY = ObjectAnimator.OfFloat(this, "translationY", translationYFrom, translationYTo); translationY.SetDuration(650); translationY.Start(); }
protected override void Prepare(View view) { AnimatorAgent.PlayTogether( ObjectAnimator.OfFloat(view, "scaleX", 0.1f, 0.475f, 1), ObjectAnimator.OfFloat(view, "scaleY", 0.1f, 0.475f, 1), ObjectAnimator.OfFloat(view, "translationX", view.Width + view.PaddingRight, -48, 0), ObjectAnimator.OfFloat(view, "alpha", 0, 1, 1) ); }
protected override void Prepare(View view) { PlayTogether( ObjectAnimator.OfFloat(view, SCALE_X, 1f, 1.5f), ObjectAnimator.OfFloat(view, SCALE_Y, 1f, 1.5f), ObjectAnimator.OfFloat(view, ALPHA, 1, 0) ); SetInterpolator(new BackEaseOutInterpolator()); }
protected override void Prepare(View view) { int distance = view.Top + view.Height; AnimatorAgent.PlayTogether( ObjectAnimator.OfFloat(view, "alpha", 0, 1), Glider.Glide <BounceEaseIn>(Duration, ObjectAnimator.OfFloat(view, "translationY", -distance, 0)) ); }
void ClosePopOverOnInit() { CallMeBackViewHeader.Visibility = ViewStates.Visible; CallMeBackViewBody.Visibility = ViewStates.Visible; ObjectAnimator Animator = ObjectAnimator.OfFloat(CallMeBackPopOver, "TranslationY", 0, FinalYPosition); Animator.Start(); }
public static ViewPropertyAnimator ScrollY(this ViewPropertyAnimator vpa, ImageView imgView, params int[] values) { ObjectAnimator objAnim = ObjectAnimator.OfInt(imgView, "ScrollY", values); objAnim.SetDuration(vpa.Duration); objAnim.StartDelay = vpa.StartDelay; objAnim.Start(); return(vpa); }
protected override void Prepare(View view) { PlayTogether( ObjectAnimator.OfFloat(view, SCALE_Y, 1, Max, 1), ObjectAnimator.OfFloat(view, SCALE_X, 1, Max, 1) ); SetInterpolator(new QuadEaseInOutInterpolator()); SetRepeat(); }
protected override void Prepare(View view) { PlayTogether( ObjectAnimator.OfFloat(view, SCALE_X, 0.1f, 0.475f, 1), ObjectAnimator.OfFloat(view, SCALE_Y, 0.1f, 0.475f, 1), ObjectAnimator.OfFloat(view, TRANSLATION_X, view.Width + view.PaddingRight, -48, 0), ObjectAnimator.OfFloat(view, ALPHA, 0, 1, 1) ); }
public static ViewPropertyAnimator ScrollX(this ViewPropertyAnimator vpa, ImageView imgView, params int[] values) { ObjectAnimator objAnim = ObjectAnimator.OfInt(imgView, "ScrollX", values); objAnim.SetDuration(vpa.Duration / 2); //Divide by 2 so it will take less time. objAnim.StartDelay = vpa.StartDelay; objAnim.Start(); return(vpa); }
protected override void Prepare(View view) { PlayTogether( ObjectAnimator.OfFloat(view, ALPHA, 1, 1, 0), ObjectAnimator.OfFloat(view, SCALE_X, 1, 0.475f, 0.1f), ObjectAnimator.OfFloat(view, SCALE_Y, 1, 0.475f, 0.1f), ObjectAnimator.OfFloat(view, TRANSLATION_X, 0, 42, -view.Right) ); }
protected override void Prepare(View view) { PlayTogether( ObjectAnimator.OfFloat(view, SCALE_X, 0.1f, 0.475f, 1), ObjectAnimator.OfFloat(view, SCALE_Y, 0.1f, 0.475f, 1), ObjectAnimator.OfFloat(view, TRANSLATION_Y, -view.Bottom, 60, 0), ObjectAnimator.OfFloat(view, ALPHA, 0, 1, 1) ); }
public virtual void Show() { ObjectAnimator animator = ObjectAnimator.OfFloat(this, "y", showPosition); animator.SetInterpolator(new BounceInterpolator()); animator.SetDuration(1500); animator.Start(); isShow = true; }
private void RemovePicture(int index) { removeIndex = index; ObjectAnimator animator = ObjectAnimator.OfFloat(GetChildFromDrawOrder(index), "Alpha", 0); animator.SetDuration(tweenTime); animator.AnimationEnd += Animator_AnimationEnd; animator.Start(); }
public void animacionrepetitiva(Java.Lang.Object objeto, string propiedad) { var anim = ObjectAnimator.OfFloat(objeto, propiedad, 0.8f, 1f); anim.SetDuration(1000); anim.RepeatCount = int.MaxValue - 200; anim.RepeatMode = ValueAnimatorRepeatMode.Reverse; anim.Start(); }
protected override void Prepare(UIView view) { int distance = view.Top + view.Height; AnimatorAgent.PlayTogether( ObjectAnimator.OfFloat(view, "alpha", 0, 1), ObjectAnimator.OfFloat(view, "translationY", -distance, 0) ); }
protected override void Prepare(View view) { int distance = view.Top + view.Height; PlayTogether( ObjectAnimator.OfFloat(view, ALPHA, 0, 1), ObjectAnimator.OfFloat(view, TRANSLATION_Y, -distance, 0) ); }
public override ObjectAnimator GetInitialAnimator(Android.Content.Context context) { ObjectAnimator animator = ObjectAnimator.OfPropertyValuesHolder( PropertyValuesHolder.OfFloat("alpha", 0.5f, 1f), PropertyValuesHolder.OfFloat("rotation", 60f, 0f)); animator.SetDuration((long)(200 * mSpeedFactor)); return(animator); }
public Animator CreateAnimation(View view, float startScale, float endScale) { view.ScaleX = startScale; view.ScaleY = startScale; PropertyValuesHolder holderX = PropertyValuesHolder.OfFloat("scaleX", startScale, endScale); PropertyValuesHolder holderY = PropertyValuesHolder.OfFloat("scaleY", startScale, endScale); return(ObjectAnimator.OfPropertyValuesHolder(view, holderX, holderY)); }
public void AnimateX(int to, long duration = 200) { var animator = ObjectAnimator.OfFloat(this, "x", to); animator.SetDuration(duration); animator.Start(); UpdateInternalX(to); }
private void CreateAnimation() { if (animation == null) { animation = ObjectAnimator.OfFloat(ball, "y", ball.Y, Height - 50f); animation.SetDuration(1500); animation.SetInterpolator(new AccelerateInterpolator(2f)); animation.Update += delegate { Invalidate(); }; } }