Improve wallpaper preview loading transition
- Fix WallpaperPreviewBitmapTransformation rounding error when scaling
- Precompute the thumbnail background color to use as placeholder if
possible
- Allow the placeholder to be serialized in WallpaperInfo so it's
available when opening the preview
- If available, obtain a low res preview as bitmap
- Remove unused views from wallpaper_preview_card
- Make TouchForwardingLayout transparent from loading to avoid it
showing in the fragment transition
Before/after videos: https://drive.google.com/drive/folders/1-PqL0BCOuet9pnrYVphewpwAcvVoBCwo?usp=sharing
Bug: 184111918
Test: visual check
Change-Id: Icaabafd5c430a0324899e471aa8f28453ab04f1a
diff --git a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
index 989d7a5..60c0fc8 100755
--- a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
+++ b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
@@ -1417,6 +1417,7 @@
int wallpaperIndex = (shouldShowRotationTile() || mCategory.supportsCustomPhotos())
? position - 1 : position;
WallpaperInfo wallpaper = mWallpapers.get(wallpaperIndex);
+ wallpaper.computePlaceholderColor(holder.itemView.getContext());
((IndividualHolder) holder).bindWallpaper(wallpaper);
boolean isWallpaperApplied = mAppliedWallpaperIds.contains(wallpaper.getWallpaperId());