Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# PreferenceManager.OnActivityStopListener\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnActivityStopListener\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/preference/PreferenceManager.OnActivityStopListener \"View this page in Java\") \n\n```\ninterface OnActivityStopListener\n```\n\n|------------------------------------------------------------------|\n| [android.preference.PreferenceManager.OnActivityStopListener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 29.**\n|\n| Use the [AndroidX](https://developer.android.com/jetpack/androidx.html) [Preference Library](https://developer.android.com/reference/androidx/preference/package-summary.html) 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.html).\n\nInterface definition for a class that will be called when the container's activity is stopped.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onActivityStop](#onActivityStop())`()` See Activity's onStop. |\n\nPublic methods\n--------------\n\n### onActivityStop\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onActivityStop(): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nSee Activity's onStop."]]