setLayoutMarginTop

fun View.setLayoutMarginTop(margin: Int?)

Sets the ViewGroup.MarginLayoutParams.topMargin of the View to the given margin. If margin is null, the top margin is set to 0.