setLayoutMarginRight

fun View.setLayoutMarginRight(margin: Int?)

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