commit | 5ebbfea34dc2065a8c3e708d29c4ae6df4c85892 | [log] [tgz] |
---|---|---|
author | Chihhang Chuang <chihhangchuang@google.com> | Thu Apr 15 09:50:24 2021 +0800 |
committer | Chihhang Chuang <chihhangchuang@google.com> | Thu Apr 15 09:54:00 2021 +0800 |
tree | 09a54ce0bbc3428434b2e713b85275c5cddd6a4a | |
parent | 2e080928037a7dffe574b645d61c8ba5ce598fe4 [diff] [blame] |
Add edge-to-edge effect to IndividualPickerFragment Before: https://drive.google.com/file/d/1sTLLSEYOpLRKOcf5w0db-nMx5qAAga-q/view?usp=sharing After: https://drive.google.com/file/d/1K0f7Asn8uaJHrGYrqoSXeDwUS2kBBk6M/view?usp=sharing The daily rotation button will be moved out bottom action bar, so there is no blocking for grid items. Bug: 185293474 Test: manual Change-Id: Ifd991ba9f3a1750c33e572e0145bce73c721a086
diff --git a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java index c9be889..d2921a3 100755 --- a/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java +++ b/src/com/android/wallpaper/picker/individual/IndividualPickerFragment.java
@@ -517,6 +517,15 @@ updateLoading(); maybeSetUpImageGrid(); setUpBottomSheet(); + // For nav bar edge-to-edge effect. + view.findViewById(R.id.wallpaper_grid).setOnApplyWindowInsetsListener((v, windowInsets) -> { + v.setPadding( + v.getPaddingLeft(), + v.getPaddingTop(), + v.getPaddingRight(), + windowInsets.getSystemWindowInsetBottom()); + return windowInsets.consumeSystemWindowInsets(); + }); return view; }