Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a79803c0 authored by Chet Haase's avatar Chet Haase
Browse files

Fixed ProgressBar logic for AnimationDrawables

There are problems in ICS using custom ProgressBar indeterminate drawables when
those drawables are AnimationDrawables. Code that determines appropriate aspect-ratio
sizing should not kick in for this case; the animation drawables know what size
they should be.

Change-Id: I7c35e0dc0f2719f698551f197c688e6156a3f5bd
parent 55b039f1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -937,7 +937,8 @@ public class ProgressBar extends View {
        int left = 0;

        if (mIndeterminateDrawable != null) {
            if (mOnlyIndeterminate) {
            // Aspect ratio logic does not apply to AnimationDrawables
            if (mOnlyIndeterminate && !(mIndeterminateDrawable instanceof AnimationDrawable)) {
                // Maintain aspect ratio. Certain kinds of animated drawables
                // get very confused otherwise.
                final int intrinsicWidth = mIndeterminateDrawable.getIntrinsicWidth();