daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2. public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  3.  
  4.     View view = inflater.inflate(R.layout.intro1, container, false);
  5.  
  6.     /** initializing Views **/
  7.     initViews(view);
  8.  
  9.     startAnimation();
  10.  
  11.     return view;
  12. }
  13.    
  14. private void startAnimations() {
  15.     ObjectAnimator rotateTasks = ObjectAnimator.ofFloat(viewTasks,"rotation",0f,360f);
  16.     ObjectAnimator alphaTasks = ObjectAnimator.ofFloat(viewTasks, "alpha",0f,1.0f);
  17.  
  18.     final ObjectAnimator alphaPaint = ObjectAnimator.ofFloat(viewPaint,"alpha",0f,1.0f);
  19.     final ObjectAnimator scaleXPaint = ObjectAnimator.ofFloat(viewPaint,"scaleX",1.0f,1.2f);
  20.     final ObjectAnimator scaleYPaint = ObjectAnimator.ofFloat(viewPaint,"scaleY",1.0f,1.2f);
  21.  
  22.     taskAnimator = new AnimatorSet();
  23.     taskAnimator.setInterpolator(new AccelerateInterpolator(-0.1f));
  24.     taskAnimator.setDuration(DEFAULT_ANIMATION_DURATION);
  25.     taskAnimator.play(rotateTasks)
  26.             .with(alphaTasks)
  27.             .with(alphaPaint)
  28.             .with(scaleXPaint)
  29.             .with(scaleYPaint);
  30.     taskAnimator.start();
  31. }
RAW Paste Data
Top