# AppCompatCallback

added in[version 24.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/app/AppCompatCallback#pubmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#)  

# AppCompatCallback

| 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
AppCompatCallback
`  
`


`

|------------------------------------------|
| android.support.v7.app.AppCompatCallback |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#)Known Indirect Subclasses [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog),[AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity),[AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog),[MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog),[MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog) |-------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| | [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog)                               | A subclass of Dialog that can display one, two or three buttons.                                                                                  | | [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity)                   | Base class for activities that use the[support library](https://developer.android.com/tools/extras/support-library)action bar features.           | | [AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog)                       | Base class for AppCompat themed[Dialog](https://developer.android.com/reference/android/app/Dialog.html)s.                                        | | [MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog)       | This class implements the route chooser dialog for[MediaRouter](https://developer.android.com/reference/android/support/v7/media/MediaRouter).    | | [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog) | This class implements the route controller dialog for[MediaRouter](https://developer.android.com/reference/android/support/v7/media/MediaRouter). | ||

<br />

*** ** * ** ***

Implemented this in order for AppCompat to be able to callback in certain situations.

This should be provided to[create(android.app.Activity, AppCompatCallback)](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate#create(android.app.Activity, android.support.v7.app.AppCompatCallback)).

## Summary

|                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                              ||
|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void`                                                                                     | ` `[onSupportActionModeFinished](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#onSupportActionModeFinished(android.support.v7.view.ActionMode))`(`[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)` mode) ` Called when a support action mode has finished.                                                                |
| ` abstract void`                                                                                     | ` `[onSupportActionModeStarted](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#onSupportActionModeStarted(android.support.v7.view.ActionMode))`(`[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode)` mode) ` Called when a support action mode has been started.                                                              |
| ` abstract `[ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode) | ` `[onWindowStartingSupportActionMode](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback#onWindowStartingSupportActionMode(android.support.v7.view.ActionMode.Callback))`(`[ActionMode.Callback](https://developer.android.com/reference/android/support/v7/view/ActionMode.Callback)` callback) ` Called when a support action mode is being started for this window. |

## Public methods

### onSupportActionModeFinished

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

```
void onSupportActionModeFinished (ActionMode mode)
```

Called when a support action mode has finished.

<br />

|                            Parameters                            ||
|--------|----------------------------------------------------------|
| `mode` | `ActionMode`: The action mode that just finished. <br /> |

### onSupportActionModeStarted

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

```
void onSupportActionModeStarted (ActionMode mode)
```

Called when a support action mode has been started.

<br />

|                    Parameters                     ||
|--------|-------------------------------------------|
| `mode` | `ActionMode`: The new action mode. <br /> |

### onWindowStartingSupportActionMode

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

```
ActionMode onWindowStartingSupportActionMode (ActionMode.Callback callback)
```

Called when a support action mode is being started for this window. Gives the callback an opportunity to handle the action mode in its own unique and beautiful way. If this method returns null the system can choose a way to present the mode or choose not to start the mode at all.

<br />

|                                           Parameters                                            ||
|------------|-------------------------------------------------------------------------------------|
| `callback` | `ActionMode.Callback`: Callback to control the lifecycle of this action mode <br /> |

|                                                                                  Returns                                                                                  ||
|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [ActionMode](https://developer.android.com/reference/android/support/v7/view/ActionMode) | The ActionMode that was started, or null if the system should present it <br /> |

-

  ## Interfaces

  - [ActionBar.OnMenuVisibilityListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnMenuVisibilityListener)
  - [ActionBar.OnNavigationListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.OnNavigationListener)
  - [ActionBar.TabListener](https://developer.android.com/reference/android/support/v7/app/ActionBar.TabListener)
  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.DelegateProvider)
  - [AppCompatCallback](https://developer.android.com/reference/android/support/v7/app/AppCompatCallback)
-

  ## Classes

  - [ActionBar](https://developer.android.com/reference/android/support/v7/app/ActionBar)
  - [ActionBar.LayoutParams](https://developer.android.com/reference/android/support/v7/app/ActionBar.LayoutParams)
  - [ActionBar.Tab](https://developer.android.com/reference/android/support/v7/app/ActionBar.Tab)
  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle)
  - [AlertDialog](https://developer.android.com/reference/android/support/v7/app/AlertDialog)
  - [AlertDialog.Builder](https://developer.android.com/reference/android/support/v7/app/AlertDialog.Builder)
  - [AppCompatActivity](https://developer.android.com/reference/android/support/v7/app/AppCompatActivity)
  - [AppCompatDelegate](https://developer.android.com/reference/android/support/v7/app/AppCompatDelegate)
  - [AppCompatDialog](https://developer.android.com/reference/android/support/v7/app/AppCompatDialog)
  - [AppCompatDialogFragment](https://developer.android.com/reference/android/support/v7/app/AppCompatDialogFragment)
  - [AppCompatViewInflater](https://developer.android.com/reference/android/support/v7/app/AppCompatViewInflater)
  - [MediaRouteActionProvider](https://developer.android.com/reference/android/support/v7/app/MediaRouteActionProvider)
  - [MediaRouteButton](https://developer.android.com/reference/android/support/v7/app/MediaRouteButton)
  - [MediaRouteChooserDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialog)
  - [MediaRouteChooserDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteChooserDialogFragment)
  - [MediaRouteControllerDialog](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialog)
  - [MediaRouteControllerDialogFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteControllerDialogFragment)
  - [MediaRouteDialogFactory](https://developer.android.com/reference/android/support/v7/app/MediaRouteDialogFactory)
  - [MediaRouteDiscoveryFragment](https://developer.android.com/reference/android/support/v7/app/MediaRouteDiscoveryFragment)