Merge "Fixed ProgressBar logic for AnimationDrawables"

This commit is contained in:
Chet Haase
2011-09-29 07:47:16 -07:00
committed by Android (Google) Code Review

View File

@@ -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();