# CollapsibleActionView

Artifact: [androidx.appcompat:appcompat](https://developer.android.com/jetpack/androidx/releases/appcompat) [View Source](https://cs.android.com/search?q=file:androidx/appcompat/view/CollapsibleActionView.java+class:androidx.appcompat.view.CollapsibleActionView) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.2.0)

*** ** * ** ***


```
interface CollapsibleActionView
```

<br />

Known direct subclasses [SearchView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/SearchView)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/widget/SearchView` | A widget that provides a user interface for the user to enter a search query and submit a request to a search provider. |

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
>
> Use the platform-provided `https://developer.android.com/reference/android/view/CollapsibleActionView.html` interface.

When a `https://developer.android.com/reference/android/view/View.html` implements this interface it will receive callbacks when expanded or collapsed as an action view alongside the optional, app-specified callbacks to `https://developer.android.com/reference/kotlin/androidx/core/view/MenuItemCompat.OnActionExpandListener`.

See `https://developer.android.com/reference/kotlin/androidx/core/view/MenuItemCompat` for more information about action views. See `https://developer.android.com/reference/android/app/ActionBar.html` for more information about the action bar.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onActionViewCollapsed](https://developer.android.com/reference/kotlin/androidx/appcompat/view/CollapsibleActionView#onActionViewCollapsed())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onActionViewExpanded](https://developer.android.com/reference/kotlin/androidx/appcompat/view/CollapsibleActionView#onActionViewExpanded())()` **This function is deprecated.** Deprecated in Java |

## Public functions

### onActionViewCollapsed

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.2.0)

```
fun [onActionViewCollapsed](https://developer.android.com/reference/kotlin/androidx/appcompat/view/CollapsibleActionView#onActionViewCollapsed())(): Unit
```

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

Called when this view is collapsed as an action view. See `https://developer.android.com/reference/android/view/MenuItem.html#collapseActionView()`.

### onActionViewExpanded

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.2.0)

```
fun [onActionViewExpanded](https://developer.android.com/reference/kotlin/androidx/appcompat/view/CollapsibleActionView#onActionViewExpanded())(): Unit
```

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

Called when this view is expanded as an action view. See `https://developer.android.com/reference/android/view/MenuItem.html#expandActionView()`.