# compose

Joost Klitsie

12/17/2020, 1:48 PM
Hi guys! I have created an indeterminate border modifier, which can basically animate any shape you give it as an indeterminate loading spinner, for example along the contoures of a button. I created this ProgressBorderModifier based on a pre-compose version of the same concept I once made, but for the animation I now could copy (I mean get inspired by) the CircularProgressIndicator and I also looked at the Border Modifier to see how to draw it in the end. So my question: Within there is a BorderModifier private class. This overrides the equals, and I was curious as to why is that exactly? (I am guessing so compose will figure out when to redraw/cache the object as a form of optimization) Also if we compare that to my own ProgressBorder: Should I also implement this somehow as a feat of optimization? I guess my progress border is perhaps a bit different, as it will continuously needs to be redrawn when it is visible, as opposed to a static button that only needs to be drawn once.
😎 14
👍🏻 2
🤩 7


12/17/2020, 2:43 PM