UI设计的图片效果为 顶部两个角为圆角 底部两个角为直角
经过尝试 终于解决啦,解决思路提供一下
1. 使用BezelImageView
2.属性添加
app:maskDrawable="@drawable/rectangle_mask"
3.创建drawable rectangle_mask
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#000" /> <corners android:topLeftRadius="4dp" android:topRightRadius="4dp" /> </shape>