Code example for AnimationSet

Methods: startaddAnimation

0
     * �������ϣ���ʾ�������䶯����ʹ��������ʧ�� 
     */ 
    public void hide() { 
        if (getVisibility() == View.VISIBLE) {
            float start = getProgress() / (float) getMax();
            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 
Experience pair programming with AI  Get Codota for Java