[android-components](../../index.md) / [mozilla.components.support.ktx.android.view](../index.md) / [android.view.View](index.md) / [setPadding](./set-padding.md)

# setPadding

`fun `[`View`](https://developer.android.com/reference/android/view/View.html)`.setPadding(padding: `[`Padding`](../../mozilla.components.support.base.android/-padding/index.md)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/View.kt#L74)

Set a padding using [Padding](../../mozilla.components.support.base.android/-padding/index.md) object.

