https://kotlinlang.org logo
k

Kevin Hester

02/17/2020, 6:33 PM
A question on modifiers "
Copy code
Modifier elements may be combined using `+` Order is significant; modifier elements to the left
* are applied before modifier elements to the right.
Does the last applied operator override previous modifers of the same type? i.e. if I have something like lA = LayoutSize(...) lB = LayoutSize(...) modifer = lA + lB Is this doc saying that lB will be the layout size for the modifier?
m

Mihai Popa

02/18/2020, 12:25 PM
No, modifiers are conceptually unable to override previous ones
In your example, the size set by IA will have priority, because it is the first modifier to be applied
2 Views