diff options
author | Alan Viverette <alanv@google.com> | 2014-02-03 14:32:07 -0800 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2014-02-03 14:32:07 -0800 |
commit | 4803bc1ab732323f907260e3eb89e4498bc75739 (patch) | |
tree | d1b5ef86104996df0fee548ff1c84bd98f5c3a43 /core/java/android/widget | |
parent | 4c2315d10c462cbebe098cae656675a46e8cfe3d (diff) | |
download | frameworks_base-4803bc1ab732323f907260e3eb89e4498bc75739.zip frameworks_base-4803bc1ab732323f907260e3eb89e4498bc75739.tar.gz frameworks_base-4803bc1ab732323f907260e3eb89e4498bc75739.tar.bz2 |
Fix ordering of dimension caching during ImageView.setResource()
BUG: 12876148
Change-Id: I8c27546851f491e229a880307d34e1da8e74e6c2
Diffstat (limited to 'core/java/android/widget')
-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) { |