Can I use Jetpack compose icons outside @Composable?
I would like to convert compose icons (actually instances of ImageVector) to Bitmap or Drawable. How to achieve this?
All methods like rememberVectorPainter() or Image() requiring @Composable context. But I just want to use them as ordinary Bitmap/Drawable, is it possible?
I would like to convert compose icons (actually instances of ImageVector)
ImageVector is a class in androidx.compose.ui.graphics.vector, which means it can only be used if you use the Compose libraries.
Good news is all the material icons can be obtained as SVG or PNG which can be used as Drawable resources with Android Studio's Resource Manager (Tools Menu -> Resource Manager). Also check out related vector asset studio
You can get the icons (SVG and PNG versions) here.
Just click on the icon and a pane will pop up on the right with blue buttons to download the icons.