Closed ChristophKaser closed 1 day ago
I'm afraid that Insetter is basically in maintenance mode. Feel free to submit PRs though if you want to fix it yourself.
@ChristophKaser, sure that marginEnd
is the issue? I just spent a lot of time trying to figure out a margin issue and it turned out that the layout_gravity
attribute was the problem.
Yes, I am pretty sure that my issue was solved by using "marginHorizontal" instead of "marginEnd". I did not see issues with layout_gravity, though that might depend on the parent layout.
When I try to use the Insetter with margins on a view with layout_marginEnd, no horizontal margins are applied.
This is caused by the method "setMargins" used in ViewGroup.MarginLayoutParams.updateMargins, which internally sets the NEED_RESOLUTION_MASK layout flag, which causes the specified rightMargin to be ignored.
To reproduce, use this code:
with a FAB that is defined like this: