Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BottomSheet] Update edge-to-edge paddings when bottom sheet is laid out
Since adding bottom sheet behavior callbacks won't trigger any callbacks to be called, the bottom sheet paddings won't be updated right away. This causes the issue that top paddings are not correctly applied when the bottom sheet is initially expanded. Besides that, due to some unknown reason, bottom sheet's getTop() method will only return a non-zero value that is the offset to the container top when calling from bottom sheet behavior callbacks. It seems related to how ViewCompat.offsetTopAndBottom() is working. Not 100% sure. Therefore this CL add a internal callback to BottomSheetCallback class so when bottom sheet is being laid out (and getting offset), we can update paddings right away. Resolves #2165 PiperOrigin-RevId: 429071367
- Loading branch information