Quantcast
Channel: Material icon size adjustment in Jetpack Compose? - Stack Overflow
Browsing latest articles
Browse All 7 View Live

Answer by Sadisha for Material icon size adjustment in Jetpack Compose?

If you are using just an Icon you can use the .size() modifier.Icon( imageVector = Icons.Outlined.Clear, contentDescription = "clear", modifier = Modifier.size(24.dp))But if you are using an IconButton...

View Article


Image may be NSFW.
Clik here to view.

Answer by Tobias for Material icon size adjustment in Jetpack Compose?

What works for me is to use Modifier.fillMaxSize(...)), e.g.Icon(Icons.Filled.Person, contentDescription = "Person", modifier = Modifier.fillMaxSize(0.5F))Icon(Icons.Filled.Person, contentDescription =...

View Article


Answer by Gabriele Mariotti for Material icon size adjustment in Jetpack...

With 1.0.x just use the Modifier.size(xx.dp)Icon(Icons.Filled.Person,"contentDescription", modifier = Modifier.size(128.dp))

View Article

Answer by noe for Material icon size adjustment in Jetpack Compose?

The accepted answer no longer works in 1.0.0-alpha11. This is the associated bug report. As per the bug report comments, the new way of doing this from alpha12 on would be:Icon(Icons.Filled.Person,...

View Article

Answer by Alon Albert for Material icon size adjustment in Jetpack Compose?

To make the answer above more accesible, define some extension functions:fun VectorAsset.resize(size: Int) = this.resize(size.dp)fun VectorAsset.resize(size: Dp) = this.resize(size, size)fun...

View Article


Answer by Muthukrishnan Rajendran for Material icon size adjustment in...

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 = 24fAnd using the size...

View Article

Image may be NSFW.
Clik here to view.

Material icon size adjustment in Jetpack Compose?

Jetpack compose provides a nice Icon() object to display icons that accepts a vector asset. Typically, you are able to set the size via a modifier:Icon(Icons.Filled.PersonPin,...

View Article
Browsing latest articles
Browse All 7 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>