Quantcast
Viewing all articles
Browse latest Browse all 7

Answer by Muthukrishnan Rajendran for Material icon size adjustment in Jetpack Compose?

Internally material icon size is 24.dp

// All Material icons (currently) are 24dp by 24dp, with a viewport size of 24 by 24.@PublishedApiinternal const val MaterialIconDimension = 24f

And using the size in modifier it's not working, So we can change the icon by copying the icon and change the default height and width.

Icon(Icons.Filled.Person.copy(defaultHeight = 128.dp, defaultWidth = 128.dp))

NOTE: This is not an official recommendation to set the icon size,Just a hack way to change the icon size.


Viewing all articles
Browse latest Browse all 7

Trending Articles