Code example for AnimationSet

Methods: startaddAnimation

0
        if (getVisibility() == View.VISIBLE) {
            float start = getProgress() / (float) getMax();
            // mAnimation = new AlphaAnimation(start, 1.0f); 
            // mAnimation.setDuration(mHideDuration); 
            // mAnimation.setInterpolator(mInterpolator); 
            mAnimation = new AnimationSet(false);
            AlphaAnimation a = new AlphaAnimation(start, 1.0f);
            a.setDuration(mHideDuration);
            a.setInterpolator(mInterpolator);
            AlphaAnimation b = new AlphaAnimation(1.0f, 1.0f);
            b.setDuration(mHideDuration);
            b.setStartOffset(mHideDuration);
            mAnimation.addAnimation(a);
            mAnimation.addAnimation(b);
 
            mTrans.clear();
            mAnimation.start();
            invalidate();
        } 
    } 
 
    @Override 
Contextual code suggestions in your IDE  Get Codota for Java