Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 ImageView 的顶部中心剪辑一个半圆,就像下面的 cd 封面一样
由于我没有在 Android 中使用画布,所以我不知道要实现这一点!
您可以使用以下方法:
1) 创建一个包含 2 个元素的相对布局: - 半圆形 - 您的图像
2)在图像视图上对齐半圆 3)将您的线性布局作为自定义视图(可选)否则直接使用它