# PlaceListNavigationTemplate

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/navigation/model/PlaceListNavigationTemplate.java+class:androidx.car.app.navigation.model.PlaceListNavigationTemplate) 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)

*** ** * ** ***


```
@CarProtocol
class PlaceListNavigationTemplate : Template
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> with API 7. Use the `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate` API instead.

A template that supports showing a list of places alongside a custom drawn map.

The template itself does not expose a drawing surface. In order to draw on the canvas, use `https://developer.android.com/reference/kotlin/androidx/car/app/AppManager#setSurfaceCallback(androidx.car.app.SurfaceCallback)`.

#### Template Restrictions

In regards to template refreshes, as described in `https://developer.android.com/reference/kotlin/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/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate.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/kotlin/androidx/car/app/model/ItemList`s have not changed.
- The template is sent in response to a user-initiated content refresh request. (see `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener)`.

In order to use this template your car app **MUST** declare that it uses the `
androidx.car.app.NAVIGATION_TEMPLATES` permission in the manifest.
For instance, using the deprecated `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate`, if the template was:

```kotlin
PlaceListNavigationTemplate template = new PlaceListNavigationTemplate.Builder()
         .setItemList(itemListBuilder.build())
         .setHeader(header)
         .setActionStrip(actionStrip)
         .setMapActionStrip(mapActionStrip)
         .build();
```
Using the new `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/MapWithContentTemplate`, the template would be:

```kotlin
MapWithContentTemplate template = new MapWithContentTemplate.Builder()
           .setContentTemplate(new ListTemplate.Builder()
                  .setSingleList(itemListBuilder.build())
                  .setHeader(header)
                  .build())
           .setActionStrip(actionStrip)
           .setMapController(new MapController.Builder()
                 .setMapActionStrip(mapActionStrip)
                 .build())
           .build();
```

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate.Builder` **This class is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[equals](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#equals(java.lang.Object))(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/ActionStrip?` | `[getActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getActionStrip())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 5) [getHeader](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action?` | `[getHeaderAction](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeaderAction())()` **This function is deprecated.** use `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader()` <br /> |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/ItemList?` | `[getItemList](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getItemList())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/ActionStrip?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 4) [getMapActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getMapActionStrip())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnContentRefreshDelegate?` | `[getOnContentRefreshDelegate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getOnContentRefreshDelegate())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PanModeDelegate?` | `@https://developer.android.com/reference/kotlin/androidx/car/app/annotations/RequiresCarApi(value = 4) [getPanModeDelegate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getPanModeDelegate())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText?` | `[getTitle](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getTitle())()` **This function is deprecated.** use `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader()` <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `[hashCode](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#hashCode())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[isLoading](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#isLoading())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `[toString](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#toString())()` **This function is deprecated.** Deprecated in Java |

## Public functions

### equals

```
fun [equals](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#equals(java.lang.Object))(other: Any?): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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

```
fun [getActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getActionStrip())(): ActionStrip?
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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

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

### getHeader

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

```
@RequiresCarApi(value = 5)
fun [getHeader](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader())(): Header?
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate.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.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

```
fun [getHeaderAction](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeaderAction())(): Action?
```

> [!CAUTION]
> **This function is deprecated.**   
>
> use `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader()`

Returns the `https://developer.android.com/reference/kotlin/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/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate.Builder#setHeaderAction(androidx.car.app.model.Action)` |   |

### getItemList

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)

```
fun [getItemList](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getItemList())(): ItemList?
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the list of items to display alongside the map or `null` if the list is not set.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate.Builder#setItemList(androidx.car.app.model.ItemList)` |   |

### getMapActionStrip

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

```
@RequiresCarApi(value = 4)
fun [getMapActionStrip](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getMapActionStrip())(): ActionStrip?
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate.Builder#setMapActionStrip(androidx.car.app.model.ActionStrip)` |   |

### getOnContentRefreshDelegate

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

```
fun [getOnContentRefreshDelegate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getOnContentRefreshDelegate())(): OnContentRefreshDelegate?
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/OnContentRefreshDelegate` to be called when the user requests for content refresh for this template.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/PlaceListMapTemplate.Builder#setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener)` |   |

### getPanModeDelegate

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

```
@RequiresCarApi(value = 4)
fun [getPanModeDelegate](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getPanModeDelegate())(): PanModeDelegate?
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PanModeDelegate` that should be called when the user interacts with pan mode on this template, or `null` if a `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PanModeListener` was not set.

### getTitle

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

```
fun [getTitle](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getTitle())(): CarText?
```

> [!CAUTION]
> **This function is deprecated.**   
>
> use `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader()`

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

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

### hashCode

```
fun [hashCode](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#hashCode())(): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

### isLoading

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)

```
fun [isLoading](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#isLoading())(): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns whether the template is loading.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate.Builder#setLoading(boolean)` |   |

### toString

```
fun [toString](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/PlaceListNavigationTemplate#toString())(): String
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java