android - 如何使用三个角和阴影制作图像视图
解决方案
借助材料组件库,您可以使用MaterialShapeDrawable
.
只需使用类似的东西:
<com.google.android.material.imageview.ShapeableImageView
app:shapeAppearanceOverlay="@style/onlyonecorner"
app:srcCompat="@drawable/xxx"
../>
和:
<style name="onlyonecorner">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">50%</item>
<item name="cornerSizeTopRight">0dp</item>
</style>
ShapeableImageView
需要最低1.2.0-alpha03
版本。
推荐阅读
- macos - NEFilterProvider 记录网络活动
- php - RSS 提要摘录不显示摘录
- java - 如何从回收站视图适配器中获取项目
- javascript - 反应重定向/路由器
- java - 如何使用 Java 中的 Firebase Admin 将文件上传到 Firebase 存储?
- javascript - 如何在 react-native 中有两个居中且可点击的图像链接
- firefox - Blazor 文件输入单击在 Firefox 中不起作用
- ruby-on-rails - Elasticsearch::Transport::Transport::Errors::Forbidden: [403] 发送超过 1200 个字符的文本字段时出错
- python - 如何在 Snakemake 中引用 anaconda 环境中的可执行文件
- c++ - 将文件上传到 S3 aws sdk cpp 时出错