# PaneTemplate

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

*** ** * ** ***


```
@CarProtocol
public final class PaneTemplate implements Template
```

<br />

*** ** * ** ***

A template that displays a `https://developer.android.com/reference/androidx/car/app/model/Pane`.

#### Template Restrictions

In regards to template refreshes, as described in `https://developer.android.com/reference/androidx/car/app/Screen#onGetTemplate()`, this template is considered a refresh of a previous one if:

- The previous template is in a loading state (see `https://developer.android.com/reference/androidx/car/app/model/Pane.Builder#setLoading(boolean)`, or
- The template title has not changed, and the number of rows and the title (not counting spans) of each row between the previous and new `https://developer.android.com/reference/androidx/car/app/model/Pane`s have not changed.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/model/PaneTemplate.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/ActionStrip` | `[getActionStrip](https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getActionStrip())()` **This method is deprecated.** use `https://developer.android.com/reference/androidx/car/app/model/Header#getEndHeaderActions()` instead. <br /> |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/Banner` | `@https://developer.android.com/reference/androidx/car/app/annotations/ExperimentalCarApi @https://developer.android.com/reference/androidx/car/app/annotations/RequiresCarApi(value = 9) https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getBanner()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/Banner` to display in this template. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/Header` | `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getHeader()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/Header` to display in this template. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/Action` | `[getHeaderAction](https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getHeaderAction())()` **This method is deprecated.** use `https://developer.android.com/reference/androidx/car/app/model/Header#getStartHeaderAction()` instead. <br /> |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Pane` | `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getPane()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/Pane` to display in the template. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarText` | `[getTitle](https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getTitle())()` **This method is deprecated.** use `https://developer.android.com/reference/androidx/car/app/model/Header#getTitle()` instead. <br /> |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#hashCode()()` |
| `@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/car/app/model/PaneTemplate#toString()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getActionStrip

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.7.0)

```
public @Nullable ActionStrip [getActionStrip](https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getActionStrip())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/car/app/model/Header#getEndHeaderActions()` instead.

Returns the `https://developer.android.com/reference/androidx/car/app/model/ActionStrip` for this template or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate.Builder#setActionStrip(androidx.car.app.model.ActionStrip)` |   |

### getBanner

Added in [1.9.0-alpha03](https://developer.android.com/jetpack/androidx/releases/car-app#1.9.0-alpha03)

```
@ExperimentalCarApi
@RequiresCarApi(value = 9)
public @Nullable Banner getBanner()
```

Returns the `https://developer.android.com/reference/androidx/car/app/model/Banner` to display in this template.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate.Builder#setBanner(androidx.car.app.model.Banner)` |   |

### getHeader

Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.7.0)

```
public @Nullable Header getHeader()
```

Returns the `https://developer.android.com/reference/androidx/car/app/model/Header` to display in this template.

This method was introduced in API 7, but is backwards compatible even if the client is using API 6 or below.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate.Builder#setHeader(androidx.car.app.model.Header)` |   |

### getHeaderAction

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.7.0)

```
public @Nullable Action [getHeaderAction](https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getHeaderAction())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/car/app/model/Header#getStartHeaderAction()` instead.

Returns the `https://developer.android.com/reference/androidx/car/app/model/Action` that is set to be displayed in the header of the template, or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate.Builder#setHeaderAction(androidx.car.app.model.Action)` |   |

### getPane

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

```
public @NonNull Pane getPane()
```

Returns the `https://developer.android.com/reference/androidx/car/app/model/Pane` to display in the template.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate.Builder#Builder(androidx.car.app.model.Pane)` |   |

### getTitle

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.7.0)

```
public @Nullable CarText [getTitle](https://developer.android.com/reference/androidx/car/app/model/PaneTemplate#getTitle())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/car/app/model/Header#getTitle()` instead.

Returns the title of the template or `null` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/model/PaneTemplate.Builder#setTitle(java.lang.CharSequence)` |   |

### hashCode

```
public int hashCode()
```

### toString

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