fetch the proper shortcut icons for displaying

This commit is contained in:
tibbi 2022-09-14 22:10:00 +02:00
parent 9455479cd4
commit 7172837da1
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
val appMetadata = getAppMetadataFromPackage(appPackageName) ?: continue
val appIcon = appMetadata.appIcon
val widgetTitle = info.loadLabel(context.packageManager).toString()
val widgetPreviewImage = info.loadIcon(context.packageManager)
val widgetPreviewImage = activity!!.packageManager.getDrawable(activity!!.packageName, info.iconResource, componentInfo)
val widget = AppWidget(appPackageName, appTitle, appIcon, widgetTitle, widgetPreviewImage, 0, 0)
appWidgets.add(widget)
}