# SignInTemplate

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/signin/SignInTemplate.java+class:androidx.car.app.model.signin.SignInTemplate) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
@RequiresCarApi(value = 2)
@CarProtocol
public final class SignInTemplate implements Template
```

<br />

*** ** * ** ***

A template that can be used to create a sign-in flow.

#### Template Restrictions

This template's body is only available to the user while the car is parked and does not count against the template quota.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/Screen#onGetTemplate()` |   |

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/androidx/car/app/annotations/RequiresCarApi(value = 2) public final class https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate`. |
| `public interface https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate.SignInMethod` One of the possible sign in methods that can be set on a `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#equals(java.lang.Object)(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` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#getActionStrip()()` Returns the `https://developer.android.com/reference/androidx/car/app/model/ActionStrip` for this template or `null` if not set. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/car/app/model/Action>` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#getActions()()` Returns the list of `https://developer.android.com/reference/androidx/car/app/model/Action`s displayed alongside the `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate.SignInMethod` in this template. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarText` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#getAdditionalText()()` Returns any additional text that needs to be displayed in the template or `null` if not set. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/Action` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#getHeaderAction()()` 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. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarText` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#getInstructions()()` Returns a text containing instructions on how to sign in or `null` if not set. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate.SignInMethod` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#getSignInMethod()()` Returns the sign-in method of this template. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/car/app/model/CarText` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#getTitle()()` Returns the title of the template or `null` if not set. |
| `int` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#hashCode()()` |
| `boolean` | `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate#isLoading()()` Returns whether the template is loading. |
| `@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/signin/SignInTemplate#toString()()` |

## Public methods

### equals

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

### getActionStrip

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

```
public @Nullable ActionStrip getActionStrip()
```

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/signin/SignInTemplate.Builder#setActionStrip(androidx.car.app.model.ActionStrip)` |   |

### getActions

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

```
public @NonNull List<Action> getActions()
```

Returns the list of `https://developer.android.com/reference/androidx/car/app/model/Action`s displayed alongside the `https://developer.android.com/reference/androidx/car/app/model/signin/SignInTemplate.SignInMethod` in this template.

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

### getAdditionalText

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

```
public @Nullable CarText getAdditionalText()
```

Returns any additional text that needs to be displayed in the template or `null` if not set.

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

### getHeaderAction

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

```
public @Nullable Action getHeaderAction()
```

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/signin/SignInTemplate.Builder#setHeaderAction(androidx.car.app.model.Action)` |   |

### getInstructions

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

```
public @Nullable CarText getInstructions()
```

Returns a text containing instructions on how to sign in or `null` if not set.

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

### getSignInMethod

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

```
public @NonNull SignInTemplate.SignInMethod getSignInMethod()
```

Returns the sign-in method of this template.

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

### getTitle

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

```
public @Nullable CarText getTitle()
```

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

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

### hashCode

```
public int hashCode()
```

### isLoading

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

```
public boolean isLoading()
```

Returns whether the template is loading.

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

### toString

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