Layouts codelab;
"Compose also comes with some predefined Material icons you can use, for example the close, favorite and menu icons."
Does this mean my apk automatically includes all material icons? Or do they only get packaged in if I reference them in a composable?
l
Louis Pullen-Freilich [G]
08/29/2020, 9:25 PM
androidx.compose.material:material
includes ~50 (the most commonly used) icons out of the box, so if you have the Material dependency these will be included.
There's also the separate
androidx.compose.material:material-icons-extended
dependency that includes every icon, but these aren't included by default
s
SrSouza
08/29/2020, 9:38 PM
I guess if you use R8, it will remove the not usage icons.
Material Icons is code generated and not resource files if I recall.
l
Louis Pullen-Freilich [G]
08/29/2020, 9:55 PM
Yup, the icons are just functions - so R8 will remove anything that isn't referenced