wwalkingg
02/18/2025, 4:42 AMPaddingValues.calculateLeftPadding
need a LayoutDirection parameter.
I understand PaddingValues.calculateStartPadding
need a LayoutDirection, but Left is left, why need LayoutDirection.Skaldebane
02/18/2025, 6:54 AMmaciejciemiega
02/18/2025, 7:03 AMleft
and right
) then calculateLeftPadding
could just return left
without looking at LayoutDirection
.
But that’t not always the case. In fact the majority of cases you would use a version with relative paddings (represented by internal class PaddingValuesImpl
) that stores values in start
and end
. When it’s asked to give you left
padding it needs to know the layout direction to do the opposite translation.wwalkingg
02/18/2025, 7:05 AM