Loading core/java/android/widget/ProgressBar.java +9 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,8 @@ public class ProgressBar extends View { Drawable drawable = a.getDrawable(R.styleable.ProgressBar_progressDrawable); if (drawable != null) { drawable = tileify(drawable, false); // Calling this method can set mMaxHeight, make sure the corresponding // XML attribute for mMaxHeight is read after calling this method setProgressDrawable(drawable); } Loading Loading @@ -421,6 +423,13 @@ public class ProgressBar extends View { public void setProgressDrawable(Drawable d) { if (d != null) { d.setCallback(this); // Make sure the ProgressBar is always tall enough int drawableHeight = d.getMinimumHeight(); if (mMaxHeight < drawableHeight) { mMaxHeight = drawableHeight; requestLayout(); } } mProgressDrawable = d; if (!mIndeterminate) { Loading core/java/android/widget/ViewAnimator.java +3 −2 Original line number Diff line number Diff line Loading @@ -138,14 +138,15 @@ public class ViewAnimator extends FrameLayout { final int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); final boolean checkForFirst = (!mFirstTime || mAnimateFirstTime); if (i == childIndex) { if ((!mFirstTime || mAnimateFirstTime) && mInAnimation != null) { if (checkForFirst && mInAnimation != null) { child.startAnimation(mInAnimation); } child.setVisibility(View.VISIBLE); mFirstTime = false; } else { if (mOutAnimation != null && child.getVisibility() == View.VISIBLE) { if (checkForFirst && mOutAnimation != null && child.getVisibility() == View.VISIBLE) { child.startAnimation(mOutAnimation); } else if (child.getAnimation() == mInAnimation) child.clearAnimation(); Loading Loading
core/java/android/widget/ProgressBar.java +9 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,8 @@ public class ProgressBar extends View { Drawable drawable = a.getDrawable(R.styleable.ProgressBar_progressDrawable); if (drawable != null) { drawable = tileify(drawable, false); // Calling this method can set mMaxHeight, make sure the corresponding // XML attribute for mMaxHeight is read after calling this method setProgressDrawable(drawable); } Loading Loading @@ -421,6 +423,13 @@ public class ProgressBar extends View { public void setProgressDrawable(Drawable d) { if (d != null) { d.setCallback(this); // Make sure the ProgressBar is always tall enough int drawableHeight = d.getMinimumHeight(); if (mMaxHeight < drawableHeight) { mMaxHeight = drawableHeight; requestLayout(); } } mProgressDrawable = d; if (!mIndeterminate) { Loading
core/java/android/widget/ViewAnimator.java +3 −2 Original line number Diff line number Diff line Loading @@ -138,14 +138,15 @@ public class ViewAnimator extends FrameLayout { final int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); final boolean checkForFirst = (!mFirstTime || mAnimateFirstTime); if (i == childIndex) { if ((!mFirstTime || mAnimateFirstTime) && mInAnimation != null) { if (checkForFirst && mInAnimation != null) { child.startAnimation(mInAnimation); } child.setVisibility(View.VISIBLE); mFirstTime = false; } else { if (mOutAnimation != null && child.getVisibility() == View.VISIBLE) { if (checkForFirst && mOutAnimation != null && child.getVisibility() == View.VISIBLE) { child.startAnimation(mOutAnimation); } else if (child.getAnimation() == mInAnimation) child.clearAnimation(); Loading