# TimelineBuilders.TimelineEntry

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry "View this page in Java")

<br />

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

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                           ### Nested types                                                                                                                                            |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[TimelineBuilders.TimelineEntry.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry.Builder) Builder for[TimelineEntry](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry) |

|                                                                  ### Public functions                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[TimelineBuilders.TimelineEntry](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry) | `@`[RequiresSchemaVersion](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/RequiresSchemaVersion)`(major = 1, minor = 0)` [fromLayoutElement](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#fromLayoutElement(androidx.wear.protolayout.LayoutElementBuilders.LayoutElement))`(layoutElement: `[LayoutElementBuilders.LayoutElement](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.LayoutElement)`)` Returns the[TimelineEntry](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry)object containing the given layout element. |
| [LayoutElementBuilders.Layout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/LayoutElementBuilders.Layout)`?`                | [getLayout](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#getLayout())`()` Gets the contents of this timeline entry.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| [TimelineBuilders.TimeInterval](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimeInterval)`?`              | [getValidity](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#getValidity())`()` Gets the validity period for this timeline entry.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                       | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimelineEntry#toString())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

## Public functions

### fromLayoutElement

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

```
@RequiresSchemaVersion(major = 1, minor = 0)
java-static fun fromLayoutElement(layoutElement: LayoutElementBuilders.LayoutElement): TimelineBuilders.TimelineEntry
```

Returns the[TimelineEntry](https://developer.android.com/reference/kotlin/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)  

```
fun getLayout(): LayoutElementBuilders.Layout?
```

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)  

```
fun getValidity(): TimelineBuilders.TimeInterval?
```

Gets the validity period for this timeline entry.  

### toString

```
fun toString(): String
```