Looking at the material icons here <https://fonts.google.com/icons?icon.query=device+unknown> I can ...
s
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
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.
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
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
There's tools that can convert xml and svg to Compose icons. One (Svg2Compose) even has an IDE plugin.
s
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 😅