# TimelineBuilders.TimelineEntry

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

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 0)
public final class TimelineBuilders.TimelineEntry
```

<br />

*** ** * ** ***

One piece of renderable content along with the time that it is valid for.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry` |

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 0) https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#fromLayoutElement(androidx.wear.protolayout.LayoutElementBuilders.LayoutElement)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.LayoutElement layoutElement )` Returns the `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry` object containing the given layout element. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/LayoutElementBuilders.Layout` | `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#getLayout()()` Gets the contents of this timeline entry. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimeInterval` | `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#getValidity()()` Gets the validity period for this timeline entry. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#toString()()` |

## Public methods

### fromLayoutElement

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
public static @NonNull TimelineBuilders.TimelineEntry fromLayoutElement(
    @NonNull LayoutElementBuilders.LayoutElement layoutElement
)
```

Returns the `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry` object containing the given layout element.

### getLayout

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

```
public @Nullable LayoutElementBuilders.Layout getLayout()
```

Gets the contents of this timeline entry.

### getValidity

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

```
public @Nullable TimelineBuilders.TimeInterval getValidity()
```

Gets the validity period for this timeline entry.

### toString

```
public @NonNull String toString()
```