diff options
-rw-r--r-- | core/java/android/widget/ImageView.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index 62f9b0b..58e4e86 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -364,13 +364,13 @@ public class ImageView extends View { @android.view.RemotableViewMethod public void setImageResource(int resId) { if (mUri != null || mResource != resId) { + final int oldWidth = mDrawableWidth; + final int oldHeight = mDrawableHeight; + updateDrawable(null); mResource = resId; mUri = null; - final int oldWidth = mDrawableWidth; - final int oldHeight = mDrawableHeight; - resolveUri(); if (oldWidth != mDrawableWidth || oldHeight != mDrawableHeight) { |