# PreferenceManager.OnActivityDestroyListener

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/preference/PreferenceManager.OnActivityDestroyListener#pubmethods)  

# PreferenceManager.OnActivityDestroyListener

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/preference/PreferenceManager.OnActivityDestroyListener "View this page in Kotlin")\|Java

`
public
static


interface
PreferenceManager.OnActivityDestroyListener
`  
`


`

|----------------------------------------------------------------|
| android.preference.PreferenceManager.OnActivityDestroyListener |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known indirect subclasses [DialogPreference](https://developer.android.com/reference/android/preference/DialogPreference),[EditTextPreference](https://developer.android.com/reference/android/preference/EditTextPreference),[ListPreference](https://developer.android.com/reference/android/preference/ListPreference),[MultiSelectListPreference](https://developer.android.com/reference/android/preference/MultiSelectListPreference) |-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [DialogPreference](https://developer.android.com/reference/android/preference/DialogPreference)                   | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [EditTextPreference](https://developer.android.com/reference/android/preference/EditTextPreference)               | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [ListPreference](https://developer.android.com/reference/android/preference/ListPreference)                       | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | | [MultiSelectListPreference](https://developer.android.com/reference/android/preference/MultiSelectListPreference) | *This class was deprecated in API level 29. Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).* | |

<br />

*** ** * ** ***

<br />

**This interface was deprecated in API level 29.**   
Use the[AndroidX](https://developer.android.com/jetpack/androidx)[Preference Library](https://developer.android.com/reference/androidx/preference/package-summary)for consistent behavior across all devices. For more information on using the AndroidX Preference Library see[Settings](https://developer.android.com/guide/topics/ui/settings).

Interface definition for a class that will be called when the container's activity is destroyed.

## Summary

|                                                                                         ### Public methods                                                                                          ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onActivityDestroy](https://developer.android.com/reference/android/preference/PreferenceManager.OnActivityDestroyListener#onActivityDestroy())`() ` See Activity's onDestroy. |

## Public methods

### onActivityDestroy

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void onActivityDestroy ()
```

See Activity's onDestroy.

<br />