top of page
Writer's pictureCodersarts AI

Android Animation | CodersArts

  1. In Android animation I have implemented animation on that animation I have set scales of animation scaleX,ScaleY, view animate

  2. set Duration how much time we can see the animation.

  • void OnAnimationStart

  • void OnAnimationEnd

  • void OnanimationCancel

  • void OnanimationRepeat

In this animation we have to see decreasing when Animation Going To end.

there is countdown is working for 30 sec.




Animation Code :


private void playAnim(final View view, final int value, final int viewNum) { view.animate().alpha(value).scaleX(value).scaleY(value).setDuration(500) .setStartDelay(100).setInterpolator(new DecelerateInterpolator()) .setListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { } @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) @Override public void onAnimationEnd(Animator animation) { if(value==0) { switch (viewNum) { case 0: ((TextView)view).setText(questionList.get(quesNum).getQuestion()); break; case 1: ((Button)view).setText(questionList.get(quesNum).getOptionA()); case 2: ((Button)view).setText(questionList.get(quesNum).getOptionB()); case 3: ((Button)view).setText(questionList.get(quesNum).getOptionC()); case 4: ((Button)view).setText(questionList.get(quesNum).getOptionD()); } if(viewNum!=0) ((Button)view).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#FFFF00"))); playAnim(view,1,viewNum); } } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); } }





Hire an android developer to get quick help for all your android app development needs. with the hands-on android assignment help and android project help by Codersarts android expert. You can contact the android programming help expert any time; we will help you overcome all the issues and find the right solution.

Want to get help right now? Or Want to know price quote


Please send your requirement files at contact@codersarts.com. and you'll get instant reply as soon as requirement receives






8 views0 comments

Comentarios


bottom of page