Quantcast
Channel: Material icon size adjustment in Jetpack Compose? - Stack Overflow
Viewing all articles
Browse latest Browse all 7

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

$
0
0

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 try using .scale() modifier. Because you have to manually adjust the contentPadding if you change the icon size.

IconButton(    onClick = {},    modifier = Modifier.scale(0.75f)) {    Icon(        imageVector = Icons.Outlined.Clear,         contentDescription = "clear"    )}

Viewing all articles
Browse latest Browse all 7

Trending Articles



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