Android底部曲折形状 [英] Android bottom zig-zag shape
本文介绍了Android底部曲折形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要以编程方式实现以下附加图像,请问有什么办法?我知道如何在layer-list
中绘制矩形,但是对于底部的特定锯齿形纹理,我不知道
I need to achieve below attached image programatically, is there any way? I know how to draw rectangle in layer-list
but for the particular zig-zag texture in bottom I don't have any idea
请帮助我实现此形状
预先感谢
推荐答案
绘制虚线,您可以使用形状
to draw a dashed line you can use a shape
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:color="#FF00"
android:dashWidth="5dp"
android:dashGap="5dp" />
</shape>
如果要组合多个形状,则可以使用layer-list
并为每个项目定义一个形状
if you want to combine more than one shape then you can use a layer-list
and define a shape for every item
这篇关于Android底部曲折形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文