# 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
public final class PlaceListNavigationTemplate implements Template
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> with API 7. Use the `https://developer.android.com/reference/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/androidx/car/app/AppManager#setSurfaceCallback(androidx.car.app.SurfaceCallback)`.

#### 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/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/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/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/androidx/car/app/navigation/model/PlaceListNavigationTemplate`, if the template was:

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

```
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 |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate.Builder` **This class is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `boolean` | `[equals](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#equals(java.lang.Object))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` **This method is deprecated.** Deprecated in Java |
| `@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/navigation/model/PlaceListNavigationTemplate#getActionStrip())()` **This method is deprecated.** Deprecated in Java |
| `@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/annotations/RequiresCarApi(value = 5) [getHeader](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader())()` **This method is deprecated.** Deprecated in Java |
| `@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/navigation/model/PlaceListNavigationTemplate#getHeaderAction())()` **This method is deprecated.** use `https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader()` <br /> |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/ItemList` | `[getItemList](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getItemList())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/ActionStrip` | `@https://developer.android.com/reference/androidx/car/app/annotations/RequiresCarApi(value = 4) [getMapActionStrip](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getMapActionStrip())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/OnContentRefreshDelegate` | `[getOnContentRefreshDelegate](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getOnContentRefreshDelegate())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/navigation/model/PanModeDelegate` | `@https://developer.android.com/reference/androidx/car/app/annotations/RequiresCarApi(value = 4) [getPanModeDelegate](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getPanModeDelegate())()` **This method is deprecated.** Deprecated in Java |
| `@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/navigation/model/PlaceListNavigationTemplate#getTitle())()` **This method is deprecated.** use `https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader()` <br /> |
| `int` | `[hashCode](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#hashCode())()` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[isLoading](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#isLoading())()` **This method is deprecated.** Deprecated in Java |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `[toString](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#toString())()` **This method is deprecated.** Deprecated in Java |

## Public methods

### equals

```
public boolean [equals](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#equals(java.lang.Object))(@Nullable Object other)
```

> [!CAUTION]
> **This method 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)

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

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

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/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)
public @Nullable Header [getHeader](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getHeader())()
```

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

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

| See also |
|---|---|
| `https://developer.android.com/reference/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)

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

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

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

```
public @Nullable ItemList [getItemList](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getItemList())()
```

> [!CAUTION]
> **This method 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/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)
public @Nullable ActionStrip [getMapActionStrip](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getMapActionStrip())()
```

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

Returns the map `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/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)

```
public @Nullable OnContentRefreshDelegate [getOnContentRefreshDelegate](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getOnContentRefreshDelegate())()
```

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

Returns the `https://developer.android.com/reference/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/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)
public @Nullable PanModeDelegate [getPanModeDelegate](https://developer.android.com/reference/androidx/car/app/navigation/model/PlaceListNavigationTemplate#getPanModeDelegate())()
```

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

Returns the `https://developer.android.com/reference/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/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)

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

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/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/androidx/car/app/navigation/model/PlaceListNavigationTemplate.Builder#setTitle(java.lang.CharSequence)` |   |

### hashCode

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

> [!CAUTION]
> **This method 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)

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

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

Returns whether the template is loading.

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

### toString

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

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