# CollapsibleActionView

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/v7/view/CollapsibleActionView#pubmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v7/view/CollapsibleActionView#)  

# CollapsibleActionView

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


interface
CollapsibleActionView
`  
`


`

|-----------------------------------------------|
| android.support.v7.view.CollapsibleActionView |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/view/CollapsibleActionView#)Known Indirect Subclasses [SearchView](https://developer.android.com/reference/android/support/v7/widget/SearchView) |--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| | [SearchView](https://developer.android.com/reference/android/support/v7/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. | ||

<br />

*** ** * ** ***

When a[View](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[MenuItemCompat.OnActionExpandListener](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat.OnActionExpandListener).

See[MenuItemCompat](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat)for more information about action views. See[ActionBar](https://developer.android.com/reference/android/app/ActionBar.html)for more information about the action bar.

## Summary

|                                                                                                   ### Public methods                                                                                                   ||
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onActionViewCollapsed](https://developer.android.com/reference/android/support/v7/view/CollapsibleActionView#onActionViewCollapsed())`() ` Called when this view is collapsed as an action view. |
| ` abstract void` | ` `[onActionViewExpanded](https://developer.android.com/reference/android/support/v7/view/CollapsibleActionView#onActionViewExpanded())`() ` Called when this view is expanded as an action view.    |

## Public methods

### onActionViewCollapsed

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onActionViewCollapsed ()
```

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

<br />

### onActionViewExpanded

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void onActionViewExpanded ()
```

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

<br />

-

  ## Interfaces

  - [ActionMode.Callback](https://developer.android.com/reference/android/support/v7/view/ActionMode.Callback)
  - [CollapsibleActionView](https://developer.android.com/reference/android/support/v7/view/CollapsibleActionView)
-

  ## Classes

  - [ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)
  - [ContextThemeWrapper](https://developer.android.com/reference/android/support/v7/view/ContextThemeWrapper)