Kar*_*Ata 5 xml android imageview material-components-android
如何制作只有三个角的图像,我尝试使用框架布局插入图像视图,并使其成为原始图像的资源,添加另一个具有 3 个角的边框 src 的图像视图,但它不起作用
Gab*_*tti 11
通过Material Components 库,您可以使用MaterialShapeDrawable
.
只需使用类似的东西:
<com.google.android.material.imageview.ShapeableImageView
app:shapeAppearanceOverlay="@style/onlyonecorner"
app:srcCompat="@drawable/xxx"
../>
Run Code Online (Sandbox Code Playgroud)
和:
<style name="onlyonecorner">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">50%</item>
<item name="cornerSizeTopRight">0dp</item>
</style>
Run Code Online (Sandbox Code Playgroud)
将ShapeableImageView
需要最少的版本1.2.0-alpha03
。
归档时间: |
|
查看次数: |
1754 次 |
最近记录: |