Thumbnail with custom border for individual picker
This CL configures IndividualPickerFragment to use a thumbnail with a customizable border defined as a resource string representing the path of the border.
Screenshots
The following screenshots are obtained by adding the statement
```
thumbnail.setClippingPath(R.string.diamond_border);
```
after every usage of `thumbnail.setClipped`.
* Day - https://screenshot.googleplex.com/8TNpBTtKp23wp3b
* Night - https://screenshot.googleplex.com/Aybh6nsFKiZ7ajp
Bug: 182498328
Fixes: 182498328
Test: none added
Change-Id: Ic14ad2484b24d119ee60adca2951887c106e8d13
diff --git a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
index bc8242b..22c16c7 100755
--- a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
+++ b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
@@ -1032,7 +1032,7 @@
? index + 1 : index;
ViewHolder holder = mImageGrid.findViewHolderForAdapterPosition(index);
if (holder != null) {
- CircularImageView thumbnail = holder.itemView.findViewById(R.id.thumbnail);
+ CustomShapeImageView thumbnail = holder.itemView.findViewById(R.id.thumbnail);
thumbnail.setClipped(isActivated);
} else {
// Item is not visible, make sure the item is re-bound when it becomes visible.
@@ -1378,7 +1378,7 @@
mAppliedWallpaperInfo = wallpaper;
}
- CircularImageView thumbnail = holder.itemView.findViewById(R.id.thumbnail);
+ CustomShapeImageView thumbnail = holder.itemView.findViewById(R.id.thumbnail);
thumbnail.setClipped(isWallpaperApplied);
}
}