Commit c97bb8d2 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere Committed by Commit Bot

Fix BottomSheet toolbar shadow height to match 9-patch.

Since http://crrev/c/1743432, the BottomSheet background has rounded
corners with a shadow. The shadow has now a height of 16dp (vs 8dp
before that CL).

This CL introduces a new dimension to store the new height of the
shadow. This height is used to compute full/peek ratios of the bottom
sheet that are now computed correctly.

Before:
 * https://screenshot.googleplex.com/YZ67ok7O9br.png
 * https://screenshot.googleplex.com/SOVPh2N9GaA.png

After:
 * https://screenshot.googleplex.com/8HjjkL2Gt62.png
 * https://screenshot.googleplex.com/C0LTHSnBF1f.png

Bug: 985644
Change-Id: Iafbf4cda004bd03a7931a3ef7045bed9d5a05a7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1776040Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Jordan Demeulenaere <jdemeulenaere@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691974}
parent 9211cdbd
...@@ -571,6 +571,7 @@ ...@@ -571,6 +571,7 @@
<!-- Bottom Sheet dimensions --> <!-- Bottom Sheet dimensions -->
<dimen name="bottom_sheet_min_full_half_distance">140dp</dimen> <dimen name="bottom_sheet_min_full_half_distance">140dp</dimen>
<dimen name="bottom_sheet_peek_height">56dp</dimen> <dimen name="bottom_sheet_peek_height">56dp</dimen>
<dimen name="bottom_sheet_toolbar_shadow_height">16dp</dimen>
<!-- TextBubble dimensions --> <!-- TextBubble dimensions -->
<dimen name="text_bubble_margin">4dp</dimen> <dimen name="text_bubble_margin">4dp</dimen>
......
...@@ -409,7 +409,7 @@ public class BottomSheet ...@@ -409,7 +409,7 @@ public class BottomSheet
mMinHalfFullDistance = mMinHalfFullDistance =
getResources().getDimensionPixelSize(R.dimen.bottom_sheet_min_full_half_distance); getResources().getDimensionPixelSize(R.dimen.bottom_sheet_min_full_half_distance);
mToolbarShadowHeight = mToolbarShadowHeight =
getResources().getDimensionPixelOffset(R.dimen.toolbar_shadow_height); getResources().getDimensionPixelOffset(R.dimen.bottom_sheet_toolbar_shadow_height);
mGestureDetector = new BottomSheetSwipeDetector(context, this); mGestureDetector = new BottomSheetSwipeDetector(context, this);
mIsTouchEnabled = true; mIsTouchEnabled = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment