# TelephoneKeypadTemplate

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

*** ** * ** ***


```
@ExperimentalCarApi
@CarProtocol
class TelephoneKeypadTemplate : Template
```

<br />

*** ** * ** ***

A template that allows a user to dial a phone number which includes a keypad, a primary button, and a place for the user to see their dialed number.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate`. |
| `interface https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate.PhoneNumberChangeListener` An interface for clients to receive events about the phone number changing. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_EIGHT() = 8` The \`8\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_FIVE() = 5` The \`5\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_FOUR() = 4` The \`4\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_NINE() = 9` The \`9\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_ONE() = 1` The \`1\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_POUND() = 11` The \`#\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_SEVEN() = 7` The \`7\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_SIX() = 6` The \`6\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_STAR() = 10` The \`\*\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_THREE() = 3` The \`3\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_TWO() = 2` The \`2\` key in the keypad. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#KEY_ZERO() = 0` The \`0\` key in the keypad. |

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/VisibleForTesting https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#TelephoneKeypadTemplate()()` Default empty constructor for the serializer. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header?` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#getHeader()()` Returns the `https://developer.android.com/reference/kotlin/androidx/car/app/model/Header` to show in this template. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!, https://developer.android.com/reference/kotlin/androidx/car/app/model/CarText!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#getKeySecondaryTexts()()` Returns the mapping of key -\> text for the keypad button's secondary text. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#getPhoneNumber()()` Gets the phone number to show in the "dialed number" field which can be edited before calling. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/InputCallbackDelegate?` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#getPhoneNumberChangedDelegate()()` Returns the delegate that is used to fire dialed number change events back to the client app. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/model/Action?` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#getPrimaryAction()()` Returns the primary action button. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadCallbackDelegate?` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#getTelephoneKeypadCallbackDelegate()()` Returns the delegate that is used to fire key events back to the client app. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate#toString()()` |

## Constants

### KEY_EIGHT

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

```
const val KEY_EIGHT = 8: Int
```

The \`8\` key in the keypad.

### KEY_FIVE

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

```
const val KEY_FIVE = 5: Int
```

The \`5\` key in the keypad.

### KEY_FOUR

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

```
const val KEY_FOUR = 4: Int
```

The \`4\` key in the keypad.

### KEY_NINE

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

```
const val KEY_NINE = 9: Int
```

The \`9\` key in the keypad.

### KEY_ONE

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

```
const val KEY_ONE = 1: Int
```

The \`1\` key in the keypad.

### KEY_POUND

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

```
const val KEY_POUND = 11: Int
```

The \`#\` key in the keypad.

### KEY_SEVEN

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

```
const val KEY_SEVEN = 7: Int
```

The \`7\` key in the keypad.

### KEY_SIX

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

```
const val KEY_SIX = 6: Int
```

The \`6\` key in the keypad.

### KEY_STAR

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

```
const val KEY_STAR = 10: Int
```

The \`\*\` key in the keypad.

### KEY_THREE

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

```
const val KEY_THREE = 3: Int
```

The \`3\` key in the keypad.

### KEY_TWO

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

```
const val KEY_TWO = 2: Int
```

The \`2\` key in the keypad.

### KEY_ZERO

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

```
const val KEY_ZERO = 0: Int
```

The \`0\` key in the keypad.

## Public constructors

### TelephoneKeypadTemplate

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

```
@VisibleForTesting
TelephoneKeypadTemplate()
```

Default empty constructor for the serializer.

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```

### getHeader

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

```
fun getHeader(): Header?
```

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

### getKeySecondaryTexts

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

```
fun getKeySecondaryTexts(): (Mutable)Map<Int!, CarText!>
```

Returns the mapping of key -\> text for the keypad button's secondary text.

### getPhoneNumber

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

```
fun getPhoneNumber(): String?
```

Gets the phone number to show in the "dialed number" field which can be edited before calling.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/dialer/TelephoneKeypadTemplate.Builder#setPhoneNumber(java.lang.String)` |   |

### getPhoneNumberChangedDelegate

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

```
fun getPhoneNumberChangedDelegate(): InputCallbackDelegate?
```

Returns the delegate that is used to fire dialed number change events back to the client app.

### getPrimaryAction

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

```
fun getPrimaryAction(): Action?
```

Returns the primary action button. This is usually the call button, but the app can set this arbitrarily.

### getTelephoneKeypadCallbackDelegate

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

```
fun getTelephoneKeypadCallbackDelegate(): TelephoneKeypadCallbackDelegate?
```

Returns the delegate that is used to fire key events back to the client app.

### hashCode

```
fun hashCode(): Int
```

### toString

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