core-ktx / androidx.view / android.view.ViewGroup.MarginLayoutParams / updateMargins

updateMargins

fun MarginLayoutParams.updateMargins(left: Int = leftMargin, top: Int = topMargin, right: Int = rightMargin, bottom: Int = bottomMargin): Unit

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

See Also

ViewGroup.MarginLayoutParams.setMargins