Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7859 views
1
package com.artifex.mupdfdemo;
2
3
import android.animation.Animator;
4
import android.animation.AnimatorInflater;
5
import android.animation.AnimatorSet;
6
import android.app.Activity;
7
import android.view.View;
8
9
public class SafeAnimatorInflater
10
{
11
private View mView;
12
13
public SafeAnimatorInflater(Activity activity, int animation, View view)
14
{
15
AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(activity, R.animator.info);
16
mView = view;
17
set.setTarget(view);
18
set.addListener(new Animator.AnimatorListener() {
19
public void onAnimationStart(Animator animation) {
20
mView.setVisibility(View.VISIBLE);
21
}
22
23
public void onAnimationRepeat(Animator animation) {
24
}
25
26
public void onAnimationEnd(Animator animation) {
27
mView.setVisibility(View.INVISIBLE);
28
}
29
30
public void onAnimationCancel(Animator animation) {
31
}
32
});
33
set.start();
34
}
35
}
36
37