# LauncherActivity.IconResizer

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

# IconResizer

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/app/LauncherActivity.IconResizer "View this page in Java")  

```
open class IconResizer
```

|---|--------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                       ||
| ↳ | [android.app.LauncherActivity.IconResizer](https://developer.android.com/reference/kotlin/android/app/LauncherActivity.IconResizer#) |

*** ** * ** ***

| **This class was deprecated in API level 30.**
|
| Deprecated in Java.

Utility class to resize icons to match default icon size.

## Summary

|                                                        Public constructors                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------|---|
| [IconResizer](https://developer.android.com/reference/kotlin/android/app/LauncherActivity.IconResizer#IconResizer())`()` <br /> |

|                                                                                                                                                                                                                               Public methods                                                                                                                                                                                                                                ||
|----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable.html#)! | [createIconThumbnail](https://developer.android.com/reference/kotlin/android/app/LauncherActivity.IconResizer#createIconThumbnail(android.graphics.drawable.Drawable))`(`icon:` `[Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable.html#)!`)` Returns a Drawable representing the thumbnail of the specified Drawable. |

## Public constructors

### IconResizer

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

```
IconResizer()
```

## Public methods

### createIconThumbnail

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

```
open fun createIconThumbnail(icon: Drawable!): Drawable!
```

**Deprecated:** *Deprecated in Java.*

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.

|                                                                  Parameters                                                                  ||
|--------|--------------------------------------------------------------------------------------------------------------------------------------|
| `icon` | [Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable.html#)!:The icon to get a thumbnail of. |

|                                                                                               Return                                                                                               ||
|------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| [Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable.html#)! | A thumbnail for the specified icon or the icon itself if the thumbnail could not be created. |