updateMargins

inline fun ViewGroup.MarginLayoutParams.updateMargins(@Px left: Int = leftMargin, @Px top: Int = topMargin, @Px right: Int = rightMargin, @Px bottom: Int = bottomMargin)(source)

Updates the margins in the ViewGroup's ViewGroup.MarginLayoutParams. This version of the method allows using named parameters to just set one or more axes.

See also