07-20-2023, 04:35 PM
In Jetpack Compose, who can tell me is there a way to assign a Drawable Object to the Image compose view?
I took the apps installed on an Android device. I get an icon with the type that is Drawable and I want to use it in Image
val icon: Drawable = packageInfor.applicationInfo.loadIcon(packageManager)
I found there are 3 functions that can assign images
> - From Painter (IdRes)
> - From ImageBitmap
> - From ImageVector
[![enter image description here][1]][1]
From all that I don't know how to assign a Drawable instance.
[1]:
I took the apps installed on an Android device. I get an icon with the type that is Drawable and I want to use it in Image
val icon: Drawable = packageInfor.applicationInfo.loadIcon(packageManager)
I found there are 3 functions that can assign images
> - From Painter (IdRes)
> - From ImageBitmap
> - From ImageVector
[![enter image description here][1]][1]
From all that I don't know how to assign a Drawable instance.
[1]: