Use a stadium border for "My Photos" category
This CL configures the app to use a stadium border shape (rectangle with maximum corner radius) for the "My Photos" category thumbnail.
Screenshot - https://screenshot.googleplex.com/8NajUUBS4qoktnH
Fixes: 182344964
Test: none added
Change-Id: I4f2d12478de1ab0eae731b02ebf1a8a17edfa51d
diff --git a/src/com/android/wallpaper/picker/CategorySelectorFragment.java b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
index 8ea0af4..714bc89 100644
--- a/src/com/android/wallpaper/picker/CategorySelectorFragment.java
+++ b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
@@ -362,8 +362,11 @@
// Reuse the height of featured category since My Photos category & featured category
// have the same height in current UI design.
CardView categoryView = itemView.findViewById(R.id.category);
- categoryView.getLayoutParams().height =
- SizeCalculator.getFeaturedCategoryTileSize(getActivity()).y;
+ int height = SizeCalculator.getFeaturedCategoryTileSize(getActivity()).y;
+ categoryView.getLayoutParams().height = height;
+ // Use the height as the card corner radius for the "My photos" category
+ // for a stadium border.
+ categoryView.setRadius(height);
}
}