# SizeKt

Added in 1.1.0

*** ** * ** ***


```
public final class SizeKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/core/util/SizeKt#(android.util.Size).component1()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html receiver)` Returns "width", the first component of this `https://developer.android.com/reference/android/util/Size.html`. |
| `static final float` | `https://developer.android.com/reference/androidx/core/util/SizeKt#(android.util.SizeF).component1()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/SizeF.html receiver)` Returns "width", the first component of this `https://developer.android.com/reference/android/util/SizeF.html`. |
| `static final float` | `https://developer.android.com/reference/androidx/core/util/SizeKt#(androidx.core.util.SizeFCompat).component1()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/SizeFCompat receiver)` Returns "width", the first component of this `https://developer.android.com/reference/androidx/core/util/SizeFCompat`. |
| `static final int` | `https://developer.android.com/reference/androidx/core/util/SizeKt#(android.util.Size).component2()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/Size.html receiver)` Returns "height", the second component of this `https://developer.android.com/reference/android/util/Size.html`. |
| `static final float` | `https://developer.android.com/reference/androidx/core/util/SizeKt#(android.util.SizeF).component2()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/SizeF.html receiver)` Returns "height", the second component of this `https://developer.android.com/reference/android/util/SizeF.html`. |
| `static final float` | `https://developer.android.com/reference/androidx/core/util/SizeKt#(androidx.core.util.SizeFCompat).component2()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/core/util/SizeFCompat receiver)` Returns "height", the second component of this `https://developer.android.com/reference/androidx/core/util/SizeFCompat`. |

## Public methods

### component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Size.kt+function:component1) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final int component1(@NonNull Size receiver)
```

Returns "width", the first component of this `https://developer.android.com/reference/android/util/Size.html`.

This method allows to use destructuring declarations when working with sizes, for example:

```
val (w, h) = mySize
```

### component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Size.kt+function:component1) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final float component1(@NonNull SizeF receiver)
```

Returns "width", the first component of this `https://developer.android.com/reference/android/util/SizeF.html`.

This method allows to use destructuring declarations when working with sizes, for example:

```
val (w, h) = mySize
```

### component1

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Size.kt+function:component1) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
public static final float component1(@NonNull SizeFCompat receiver)
```

Returns "width", the first component of this `https://developer.android.com/reference/androidx/core/util/SizeFCompat`.

This method allows to use destructuring declarations when working with sizes, for example:

```
val (w, h) = mySize
```

### component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Size.kt+function:component2) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final int component2(@NonNull Size receiver)
```

Returns "height", the second component of this `https://developer.android.com/reference/android/util/Size.html`.

This method allows to use destructuring declarations when working with sizes, for example:

```
val (w, h) = mySize
```

### component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Size.kt+function:component2) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final float component2(@NonNull SizeF receiver)
```

Returns "height", the second component of this `https://developer.android.com/reference/android/util/SizeF.html`.

This method allows to use destructuring declarations when working with sizes, for example:

```
val (w, h) = mySize
```

### component2

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/util/Size.kt+function:component2) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
public static final float component2(@NonNull SizeFCompat receiver)
```

Returns "height", the second component of this `https://developer.android.com/reference/androidx/core/util/SizeFCompat`.

This method allows to use destructuring declarations when working with sizes, for example:

```
val (w, h) = mySize
```