# SidePropagation

Artifact: [androidx.transition:transition](https://developer.android.com/jetpack/androidx/releases/transition) [View Source](https://cs.android.com/search?q=file:androidx/transition/SidePropagation.java+class:androidx.transition.SidePropagation) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/transition#1.0.0)

*** ** * ** ***


```
class SidePropagation : VisibilityPropagation
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.transition.TransitionPropagation](https://developer.android.com/reference/kotlin/androidx/transition/TransitionPropagation) |||
|   | ↳ | [androidx.transition.VisibilityPropagation](https://developer.android.com/reference/kotlin/androidx/transition/VisibilityPropagation) ||
|   |   | ↳ | [androidx.transition.SidePropagation](https://developer.android.com/reference/kotlin/androidx/transition/SidePropagation) |

*** ** * ** ***

A `TransitionPropagation` that propagates based on the distance to the side and, orthogonally, the distance to epicenter. If the transitioning View is visible in the start of the transition, then it will transition sooner when closer to the side and later when farther. If the view is not visible in the start of the transition, then it will transition later when closer to the side and sooner when farther from the edge. This is the default TransitionPropagation used with `https://developer.android.com/reference/android/transition/Slide.html`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/transition/SidePropagation#SidePropagation()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/transition/SidePropagation#getStartDelay(android.view.ViewGroup,androidx.transition.Transition,androidx.transition.TransitionValues,androidx.transition.TransitionValues)( sceneRoot: https://developer.android.com/reference/android/view/ViewGroup.html, transition: https://developer.android.com/reference/kotlin/androidx/transition/Transition, startValues: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues?, endValues: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues? )` Called by Transition to alter the Animator start delay. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/transition/SidePropagation#setPropagationSpeed(float)(propagationSpeed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the speed at which transition propagation happens, relative to the duration of the Transition. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/transition/SidePropagation#setSide(int)(side: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the side that is used to calculate the transition propagation. |

### Inherited functions

From [androidx.transition.VisibilityPropagation](https://developer.android.com/reference/kotlin/androidx/transition/VisibilityPropagation) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/transition/VisibilityPropagation#captureValues(androidx.transition.TransitionValues)(transitionValues: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues)`

Captures the values in the start or end scene for the properties that this transition propagation monitors.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>?` `https://developer.android.com/reference/kotlin/androidx/transition/VisibilityPropagation#getPropagationProperties()()`

Returns the set of property names stored in the `https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues` object passed into `https://developer.android.com/reference/kotlin/androidx/transition/TransitionPropagation#captureValues(androidx.transition.TransitionValues)` that this transition propagation cares about for the purposes of preventing duplicate capturing of property values.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/transition/VisibilityPropagation#getViewVisibility(androidx.transition.TransitionValues)(values: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues?)`

Returns `https://developer.android.com/reference/android/view/View.html#getVisibility()` for the View at the time the values were captured.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/transition/VisibilityPropagation#getViewX(androidx.transition.TransitionValues)(values: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues?)`

Returns the View's center x coordinate, relative to the screen, at the time the values were captured.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/transition/VisibilityPropagation#getViewY(androidx.transition.TransitionValues)(values: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues?)`

Returns the View's center y coordinate, relative to the screen, at the time the values were captured.

## Public constructors

### SidePropagation

Added in 1.0.0

```
SidePropagation()
```

## Public functions

### getStartDelay

```
fun getStartDelay(
    sceneRoot: ViewGroup,
    transition: Transition,
    startValues: TransitionValues?,
    endValues: TransitionValues?
): Long
```

Called by Transition to alter the Animator start delay. All start delays will be adjusted such that the minimum becomes zero.

| Parameters |
|---|---|
| `sceneRoot: https://developer.android.com/reference/android/view/ViewGroup.html` | The root of the View hierarchy running the transition. |
| `transition: https://developer.android.com/reference/kotlin/androidx/transition/Transition` | The transition that created the Animator |
| `startValues: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues?` | The values for a specific target in the start scene. |
| `endValues: https://developer.android.com/reference/kotlin/androidx/transition/TransitionValues?` | The values for the target in the end scene. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | A start delay to use with the Animator created by `transition`. The delay will be offset by the minimum delay of all `TransitionPropagation`s used in the Transition so that the smallest delay will be 0. Returned values may be negative. |

### setPropagationSpeed

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/transition#1.0.0)

```
fun setPropagationSpeed(propagationSpeed: Float): Unit
```

Sets the speed at which transition propagation happens, relative to the duration of the Transition. A `propagationSpeed` of 1 means that a View centered at the side set in `https://developer.android.com/reference/kotlin/androidx/transition/SidePropagation#setSide(int)` and View centered at the opposite edge will have a difference in start delay of approximately the duration of the Transition. A speed of 2 means the start delay difference will be approximately half of the duration of the transition. A value of 0 is illegal, but negative values will invert the propagation.

| Parameters |
|---|---|
| `propagationSpeed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The speed at which propagation occurs, relative to the duration of the transition. A speed of 4 means it works 4 times as fast as the duration of the transition. May not be 0. |

### setSide

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/transition#1.0.0)

```
fun setSide(side: Int): Unit
```

Sets the side that is used to calculate the transition propagation. If the transitioning View is visible in the start of the transition, then it will transition sooner when closer to the side and later when farther. If the view is not visible in the start of the transition, then it will transition later when closer to the side and sooner when farther from the edge. The default is `https://developer.android.com/reference/android/view/Gravity.html#BOTTOM`.

| Parameters |
|---|---|
| `side: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The side that is used to calculate the transition propagation. Must be one of `https://developer.android.com/reference/android/view/Gravity.html#LEFT`, `https://developer.android.com/reference/android/view/Gravity.html#TOP`, `https://developer.android.com/reference/android/view/Gravity.html#RIGHT`, `https://developer.android.com/reference/android/view/Gravity.html#BOTTOM`, `https://developer.android.com/reference/android/view/Gravity.html#START`, or `https://developer.android.com/reference/android/view/Gravity.html#END`. Value is one of the following: - `Gravity.LEFT` - `Gravity.TOP` - `Gravity.RIGHT` - `Gravity.BOTTOM` - `Gravity.START` - `Gravity.END` <br /> |