diff options
author | Todd Volkert <tvolkert@google.com> | 2015-06-23 14:28:39 -0700 |
---|---|---|
committer | Todd Volkert <tvolkert@google.com> | 2015-06-23 14:45:59 -0700 |
commit | e685b3d2c867f8a7c1eac5bf9249bd3983244cf5 (patch) | |
tree | 26ea41d9fe6c7f410eb65b7a19ac543ea34ca1af /src/com | |
parent | 6304bd3489621f5433a905a45c2097ef95055b71 (diff) | |
download | android_packages_apps_PackageInstaller-e685b3d2c867f8a7c1eac5bf9249bd3983244cf5.tar.gz android_packages_apps_PackageInstaller-e685b3d2c867f8a7c1eac5bf9249bd3983244cf5.tar.bz2 android_packages_apps_PackageInstaller-e685b3d2c867f8a7c1eac5bf9249bd3983244cf5.zip |
Use icon as background image instead of main image.
ImageView doesn't handle scaling vector drawables properly when
they're set as the image of the image view. To get around this,
we set the vector drawable as the background instead.
b/22039991
Change-Id: Ibcabedea8cb999b31dabe9d78de4ae5214f588d6
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/packageinstaller/permission/ui/PermissionAppsFragment.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/packageinstaller/permission/ui/PermissionAppsFragment.java b/src/com/android/packageinstaller/permission/ui/PermissionAppsFragment.java index 82494ec4..ae7560e8 100644 --- a/src/com/android/packageinstaller/permission/ui/PermissionAppsFragment.java +++ b/src/com/android/packageinstaller/permission/ui/PermissionAppsFragment.java @@ -161,7 +161,9 @@ public final class PermissionAppsFragment extends PreferenceFragment implements final ViewGroup rootView = (ViewGroup) getView(); final ImageView iconView = (ImageView) rootView.findViewById(R.id.lb_icon); if (iconView != null) { - iconView.setImageDrawable(icon); + // Set the icon as the background instead of the image because ImageView + // doesn't properly scale vector drawables beyond their intrinsic size + iconView.setBackground(icon); } final TextView titleView = (TextView) rootView.findViewById(R.id.lb_title); if (titleView != null) { |