Here's another one I like better because it allows setting insets for both top and bottom (important as setting a window inset listener replaces any previously set one):
Copy code
enum class InsetType { None, Padding, Margin }
fun View.inset(top: InsetType = None, bottom: InsetType = None)