Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View view = inflater.inflate(R.layout.intro1, container, false);
- /** initializing Views **/
- initViews(view);
- startAnimation();
- return view;
- }
- private void startAnimations() {
- ObjectAnimator rotateTasks = ObjectAnimator.ofFloat(viewTasks,"rotation",0f,360f);
- ObjectAnimator alphaTasks = ObjectAnimator.ofFloat(viewTasks, "alpha",0f,1.0f);
- final ObjectAnimator alphaPaint = ObjectAnimator.ofFloat(viewPaint,"alpha",0f,1.0f);
- final ObjectAnimator scaleXPaint = ObjectAnimator.ofFloat(viewPaint,"scaleX",1.0f,1.2f);
- final ObjectAnimator scaleYPaint = ObjectAnimator.ofFloat(viewPaint,"scaleY",1.0f,1.2f);
- taskAnimator = new AnimatorSet();
- taskAnimator.setInterpolator(new AccelerateInterpolator(-0.1f));
- taskAnimator.setDuration(DEFAULT_ANIMATION_DURATION);
- taskAnimator.play(rotateTasks)
- .with(alphaTasks)
- .with(alphaPaint)
- .with(scaleXPaint)
- .with(scaleYPaint);
- taskAnimator.start();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement