commit | e6c7322653434316f454beeb5ca1acdf1c7ab0ef | [log] [tgz] |
---|---|---|
author | Chihhang Chuang <chihhangchuang@google.com> | Wed Apr 14 22:36:41 2021 +0800 |
committer | Chihhang Chuang <chihhangchuang@google.com> | Thu Apr 15 01:23:35 2021 +0800 |
tree | fe11cf42aa0ef08b262b048c9132ae5b8190d4fa | |
parent | ef20476be8569654fab634f78fb16d5f8ed16293 [diff] |
Add edge-to-edge effect for CategorySelectorFragment Screenshots for wallpaper: - 3 buttons: https://screenshot.googleplex.com/9dckBMzNEzheA7K.png - 3 buttons (bottom): https://screenshot.googleplex.com/4Ez28WkavJLBjyp.png - Gesture: https://screenshot.googleplex.com/9dckBMzNEzheA7K.png - Gesture (bottom): https://screenshot.googleplex.com/AjGGqfDL8Y8eXPT.png Bug: 185293474 Test: manual Change-Id: I2a3f5680840349c7862fd4e0bea0e2aa39ce2e43
diff --git a/src/com/android/wallpaper/picker/CategorySelectorFragment.java b/src/com/android/wallpaper/picker/CategorySelectorFragment.java index c82fc87..a1a6fcb 100644 --- a/src/com/android/wallpaper/picker/CategorySelectorFragment.java +++ b/src/com/android/wallpaper/picker/CategorySelectorFragment.java
@@ -157,6 +157,15 @@ getCategorySelectorFragmentHost().hideBottomActionBar(); + // For nav bar edge-to-edge effect. + view.findViewById(R.id.category_grid).setOnApplyWindowInsetsListener((v, windowInsets) -> { + v.setPadding( + v.getPaddingLeft(), + v.getPaddingTop(), + v.getPaddingRight(), + windowInsets.getSystemWindowInsetBottom()); + return windowInsets.consumeSystemWindowInsets(); + }); return view; }