mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-20 20:12:52 +08:00
Unlike other child views of AppBarLayout, CollapsingToolbarLayout will shift its top boundary to consume the window insets as well. Therefore we need to shift the top boundary back when calculating snapping positions to have a consistent logic with other views. This CL also simplifies the calculation so the origin of the y-coordinate used in the calculation will always be the top of the AppBarLayout. PiperOrigin-RevId: 413750156