Loading core/java/android/view/View.java +6 −1 Original line number Diff line number Diff line Loading @@ -9187,7 +9187,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } public final boolean getLocalVisibleRect(Rect r) { Point offset = new Point(); final Point offset = mAttachInfo != null ? mAttachInfo.mPoint : new Point(); if (getGlobalVisibleRect(r, offset)) { r.offset(-offset.x, -offset.y); // make r local return true; Loading Loading @@ -17023,6 +17023,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ final boolean mDebugLayout = SystemProperties.getBoolean(DEBUG_LAYOUT_PROPERTY, false); /** * Point used to compute visible regions. */ final Point mPoint = new Point(); /** * Creates a new set of attachment information with the specified * events handler and thread. core/java/android/widget/ProgressBar.java +22 −14 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ public class ProgressBar extends View { private boolean mOnlyIndeterminate; private Transformation mTransformation; private AlphaAnimation mAnimation; private boolean mHasAnimation; private Drawable mIndeterminateDrawable; private Drawable mProgressDrawable; private Drawable mCurrentDrawable; Loading Loading @@ -670,18 +671,14 @@ public class ProgressBar extends View { if (mUiThreadId == Thread.currentThread().getId()) { doRefreshProgress(id, progress, fromUser, true); } else { RefreshProgressRunnable r; if (mRefreshProgressRunnable != null) { // Use cached RefreshProgressRunnable if available r = mRefreshProgressRunnable; } else { // Make a new one r = new RefreshProgressRunnable(); if (mRefreshProgressRunnable == null) { mRefreshProgressRunnable = new RefreshProgressRunnable(); } final RefreshData rd = RefreshData.obtain(id, progress, fromUser); mRefreshData.add(rd); if (mAttached && !mRefreshIsPosted) { post(r); post(mRefreshProgressRunnable); mRefreshIsPosted = true; } } Loading Loading @@ -860,14 +857,26 @@ public class ProgressBar extends View { if (mIndeterminateDrawable instanceof Animatable) { mShouldStartAnimationDrawable = true; mAnimation = null; mHasAnimation = false; } else { mHasAnimation = true; if (mInterpolator == null) { mInterpolator = new LinearInterpolator(); } if (mTransformation == null) { mTransformation = new Transformation(); } else { mTransformation.clear(); } if (mAnimation == null) { mAnimation = new AlphaAnimation(0.0f, 1.0f); } else { mAnimation.reset(); } mAnimation.setRepeatMode(mBehavior); mAnimation.setRepeatCount(Animation.INFINITE); mAnimation.setDuration(mDuration); Loading @@ -881,8 +890,7 @@ public class ProgressBar extends View { * <p>Stop the indeterminate progress animation.</p> */ void stopAnimation() { mAnimation = null; mTransformation = null; mHasAnimation = false; if (mIndeterminateDrawable instanceof Animatable) { ((Animatable) mIndeterminateDrawable).stop(); mShouldStartAnimationDrawable = false; Loading Loading @@ -1030,7 +1038,7 @@ public class ProgressBar extends View { canvas.save(); canvas.translate(mPaddingLeft, mPaddingTop); long time = getDrawingTime(); if (mAnimation != null) { if (mHasAnimation) { mAnimation.getTransformation(time, mTransformation); float scale = mTransformation.getAlpha(); try { Loading Loading
core/java/android/view/View.java +6 −1 Original line number Diff line number Diff line Loading @@ -9187,7 +9187,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } public final boolean getLocalVisibleRect(Rect r) { Point offset = new Point(); final Point offset = mAttachInfo != null ? mAttachInfo.mPoint : new Point(); if (getGlobalVisibleRect(r, offset)) { r.offset(-offset.x, -offset.y); // make r local return true; Loading Loading @@ -17023,6 +17023,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal */ final boolean mDebugLayout = SystemProperties.getBoolean(DEBUG_LAYOUT_PROPERTY, false); /** * Point used to compute visible regions. */ final Point mPoint = new Point(); /** * Creates a new set of attachment information with the specified * events handler and thread.
core/java/android/widget/ProgressBar.java +22 −14 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ public class ProgressBar extends View { private boolean mOnlyIndeterminate; private Transformation mTransformation; private AlphaAnimation mAnimation; private boolean mHasAnimation; private Drawable mIndeterminateDrawable; private Drawable mProgressDrawable; private Drawable mCurrentDrawable; Loading Loading @@ -670,18 +671,14 @@ public class ProgressBar extends View { if (mUiThreadId == Thread.currentThread().getId()) { doRefreshProgress(id, progress, fromUser, true); } else { RefreshProgressRunnable r; if (mRefreshProgressRunnable != null) { // Use cached RefreshProgressRunnable if available r = mRefreshProgressRunnable; } else { // Make a new one r = new RefreshProgressRunnable(); if (mRefreshProgressRunnable == null) { mRefreshProgressRunnable = new RefreshProgressRunnable(); } final RefreshData rd = RefreshData.obtain(id, progress, fromUser); mRefreshData.add(rd); if (mAttached && !mRefreshIsPosted) { post(r); post(mRefreshProgressRunnable); mRefreshIsPosted = true; } } Loading Loading @@ -860,14 +857,26 @@ public class ProgressBar extends View { if (mIndeterminateDrawable instanceof Animatable) { mShouldStartAnimationDrawable = true; mAnimation = null; mHasAnimation = false; } else { mHasAnimation = true; if (mInterpolator == null) { mInterpolator = new LinearInterpolator(); } if (mTransformation == null) { mTransformation = new Transformation(); } else { mTransformation.clear(); } if (mAnimation == null) { mAnimation = new AlphaAnimation(0.0f, 1.0f); } else { mAnimation.reset(); } mAnimation.setRepeatMode(mBehavior); mAnimation.setRepeatCount(Animation.INFINITE); mAnimation.setDuration(mDuration); Loading @@ -881,8 +890,7 @@ public class ProgressBar extends View { * <p>Stop the indeterminate progress animation.</p> */ void stopAnimation() { mAnimation = null; mTransformation = null; mHasAnimation = false; if (mIndeterminateDrawable instanceof Animatable) { ((Animatable) mIndeterminateDrawable).stop(); mShouldStartAnimationDrawable = false; Loading Loading @@ -1030,7 +1038,7 @@ public class ProgressBar extends View { canvas.save(); canvas.translate(mPaddingLeft, mPaddingTop); long time = getDrawingTime(); if (mAnimation != null) { if (mHasAnimation) { mAnimation.getTransformation(time, mTransformation); float scale = mTransformation.getAlpha(); try { Loading