Returns a Drawable representing the thumbnail of the specified Drawable. The size of the thumbnail is defined by the dimension android.R.dimen.launcher_application_icon_size. This method is not thread-safe and should be invoked on the UI thread only.
A thumbnail for the specified icon or the icon itself if the thumbnail could not be created.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# LauncherActivity.IconResizer\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nIconResizer\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/LauncherActivity.IconResizer \"View this page in Java\") \n\n```\nopen class IconResizer\n```\n\n|---|-----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.app.LauncherActivity.IconResizer](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 30.**\n|\n| Deprecated in Java.\n\nUtility class to resize icons to match default icon size.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------|---|\n| [IconResizer](#IconResizer())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Drawable](../graphics/drawable/Drawable.html#)! | [createIconThumbnail](#createIconThumbnail(android.graphics.drawable.Drawable))`(`icon:` `[Drawable](../graphics/drawable/Drawable.html#)!`)` Returns a Drawable representing the thumbnail of the specified Drawable. |\n\nPublic constructors\n-------------------\n\n### IconResizer\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nIconResizer()\n```\n\nPublic methods\n--------------\n\n### createIconThumbnail\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun createIconThumbnail(icon: Drawable!): Drawable!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns a Drawable representing the thumbnail of the specified Drawable. The size of the thumbnail is defined by the dimension android.R.dimen.launcher_application_icon_size. This method is not thread-safe and should be invoked on the UI thread only.\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------|\n| `icon` | [Drawable](../graphics/drawable/Drawable.html#)!: The icon to get a thumbnail of. |\n\n| Return ||\n|--------------------------------------------------|----------------------------------------------------------------------------------------------|\n| [Drawable](../graphics/drawable/Drawable.html#)! | A thumbnail for the specified icon or the icon itself if the thumbnail could not be created. |"]]