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

*** ** * ** ***


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

<br />

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/model/TabCallbackDelegate#sendTabSelected(java.lang.String,androidx.car.app.OnDoneCallback)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html tabContentId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback )` Notifies that the user has selected a tab. |

## Public methods

### sendTabSelected

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

```
abstract void sendTabSelected(
    @NonNull String tabContentId,
    @NonNull OnDoneCallback callback
)
```

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 `https://developer.android.com/reference/android/os/Looper.html#getMainLooper()`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html tabContentId` | the content ID of the selected tab |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/OnDoneCallback callback` | the `https://developer.android.com/reference/androidx/car/app/OnDoneCallback` to trigger when the client finishes handling the event |