Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

21.2. AnimationDrawable

		
    private int getTotalDuration(AnimationDrawable animationDrawable) {
        int totalDuration = 0;
        for (int i = 0; i < animationDrawable.getNumberOfFrames(); i++) {
            totalDuration += animationDrawable.getDuration(i);
        }
        return totalDuration;
    }