https://kotlinlang.org logo
#compose
Title
# compose
l

Lilly

01/21/2021, 1:18 AM
It seems that
Icon
can't be resized:
Copy code
Icon(
	imageVector = Icons.Default.SentimentVerySatisfied,
	modifier = Modifier.size(40.dp) // has no effect
)
Image on the other hand works. It's a bit confusing when to use
Icon
and when
Image
.
ImageVector
,
ImageBitmap
Painter
makes it even more confusing. Can someone enlighten me here please?
v

Vinay Gaba

01/21/2021, 1:29 AM
Can you try something like this
Copy code
Icon(imageVector = Icons.Default.SentimentVerySatisfied.copy(defaultHeight = 100.dp, defaultWidth = 100.dp))
l

Lilly

01/24/2021, 12:36 AM
@Vinay Gaba This works, appreciated 🙂
👍🏼 1
c

chris-horner

01/29/2021, 12:29 AM
Is the
copy()
function on
ImageVector
coming from a particular package? In my project, the
copy()
function doesn't exist 🤔
2 Views