Looking at the material icons here https://fonts.google.com/icons?icon.query=device+unknown I can see that for example this “Device Unknown” icon exists. But in here, one can play with the settings, weight, fill and so on. Most importantly I am interested in the “Fill” one, which makes the icon look quite different when filled vs not filled.
From the icons provided by the dependency
androidx.compose.material:material-icons-extended
I don’t see any such configuration being possible. None of the options
Filled, Outlined, Rounded, Sharp and TwoTone
seem to be doing this. Is there something I am missing or is this simply not possible at the moment?
c
Chris Sinco [G]
03/24/2023, 3:30 PM
Icons on Google Fonts are now using Material Symbols, which the Compose libraries are not using, so we're a bit out of date. If you really want an icon from Google Fonts, I'd suggest downloading the drawable manually for now.
Chris Sinco [G]
03/24/2023, 3:32 PM
Also in general Material icons are now moving in the direction to be used as a variable font (hence the tooling options you see on Google Fonts). That works fine for web, but unclear how to use that in Android. So for now, you can still manually download drawables
s
Stylianos Gakis
03/24/2023, 3:33 PM
Right, and then importing it as an XML for now and using it like any other normal drawable resource.
That makes sense Chris, thank you!
l
Landry Norris
03/24/2023, 4:08 PM
There's tools that can convert xml and svg to Compose icons. One (Svg2Compose) even has an IDE plugin.
s
Stylianos Gakis
03/25/2023, 10:46 AM
Ngl, downloaded the plugin but couldn't get it to work for me, how do you even use this thing 😅 I felt stupid, no matter what I've tried it didn't work 😅