зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1372040 - Temporary showing large icons for AdaptiveIconDrawable. r=maliu
I don't want to call BitmapUtils.getBitmapFromDrawable() here for AdaptiveIconDrawable cause there might be performance impact if I create bitmap in main thread. I'll use bug 1397174 to follow up this issue. MozReview-Commit-ID: 64FE2MOk5g0 --HG-- extra : rebase_source : 041e0a5f9d7b4245650f5a229603818b11631b4e
This commit is contained in:
Родитель
171beb013a
Коммит
4a44c9d515
|
@ -121,12 +121,9 @@ public class PromptListAdapter extends ArrayAdapter<PromptListItem> {
|
|||
if (icon instanceof BitmapDrawable) {
|
||||
Bitmap bitmap = ((BitmapDrawable) icon).getBitmap();
|
||||
d = new BitmapDrawable(res, Bitmap.createScaledBitmap(bitmap, mIconSize, mIconSize, true));
|
||||
} else if (icon instanceof VectorDrawable) {
|
||||
// If it's a VectorDrawable, we don't need to scale it.
|
||||
d = icon;
|
||||
} else {
|
||||
// Other than that, we just use blank.
|
||||
d = getBlankDrawable(res);
|
||||
// FIXME: Fix scale issue for AdaptiveIconDrawable in bug 1397174
|
||||
d = icon;
|
||||
}
|
||||
|
||||
} else if (item.inGroup) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче