gpt4 book ai didi

没有overlayColor的Android GIF borderRadius

转载 作者:行者123 更新时间:2023-11-29 01:01:35 24 4
gpt4 key购买 nike

我所有的 gif 都在非纯色背景上。现在让 GIF 遵守 borderRadius 的唯一方法是使用一种名为 overlayColor 的 hack:

有没有人有任何其他解决方案? overlayColor 不是我使用的解决方案。

最佳答案

我的解决方案是将图像包装在 View 中,并使图像和 View 都具有相同的 borderRadius。编辑:最初我说图像需要有一个 overlayColor 但它看起来没有效果(这是有道理的)。添加了我正在使用的代码示例:

<View style={{ width: 80, height: 80, borderRadius: 40, overflow: 'hidden' }}>
<Image
source={image}
resizeMode='cover'
style={{
borderRadius: 40,
alignSelf: 'center',
width: 80,
height: 80
}} />
</View>

关于没有overlayColor的Android GIF borderRadius,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50770479/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com