# TabCallbackDelegate

# TabCallbackDelegate

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/car/app/model/TabCallbackDelegate "View this page in Java")

<br />

```
@CarProtocol
@RequiresCarApi(value = 6)
interface TabCallbackDelegate
```

<br />

*** ** * ** ***

A host-side delegate for sending[androidx.car.app.model.TabTemplate.TabCallback](https://developer.android.com/reference/kotlin/androidx/car/app/model/TabTemplate.TabCallback)events to the car app.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [sendTabSelected](https://developer.android.com/reference/kotlin/androidx/car/app/model/TabCallbackDelegate#sendTabSelected(java.lang.String,androidx.car.app.OnDoneCallback))`(tabContentId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`, callback: `[OnDoneCallback](https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback)`)` Notifies that the user has selected a tab. |

## Public functions

### sendTabSelected

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

```
fun sendTabSelected(tabContentId: String, callback: OnDoneCallback): Unit
```

Notifies that the user has selected a tab.

Note that the callback relates to UI events and will be executed on the main thread using[getMainLooper](https://developer.android.com/reference/android/os/Looper.html#getMainLooper()).  

|                                                  Parameters                                                  |
|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `tabContentId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | the content ID of the selected tab                                                                                                                        |
| `callback: `[OnDoneCallback](https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback) | the[OnDoneCallback](https://developer.android.com/reference/kotlin/androidx/car/app/OnDoneCallback)to trigger when the client finishes handling the event |