Hi. I'm trying to use <Icons.Menu> as a vector ico...
# compose
c
Hi. I'm trying to use Icons.Menu as a vector icon for an AppBarIcon, but it's expecting a Painter type for the icon argument. Anyone have any tips?
👍 1
l
Unfortunately the corresponding
Icon
work did not land in that release, so currently you will need to create your own: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:ui/ui-foundation/src/main/java/androidx/ui/foundation/Icon.kt;l=45 This should be available in the next release
🙇‍♂️ 2
s
You can pass an instance of
ImagePainter
which accepts
Image
l
Right, but the
Icons
provided are all
VectorAsset
s, which currently do not have a corresponding
Painter
s
Oh, my bad, I was pretty sure vector icons can be represented as
Image
🙂
k
s
First link works for me 🙂
🤔 1