Android bottom zig-zag shape
Asked Answered
S

1

2

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 enter image description here

Please help me to achieve this shape

Thanks in advance

Salpingectomy answered 27/2, 2015 at 9:9 Comment(1)
you can set background which contain your zig-zag texture portion , about rest of your control ,take one linear layout and put your back button , signup and done textview programatically . or you can easily inflate your layout to ,then what is the issue?Derward
H
5

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>

if you want to combine more than one shape then you can use a layer-list and define a shape for every item

Hessian answered 27/2, 2015 at 9:14 Comment(7)
Hey I am trying to use this drawable as my ImageView Background But Nothing workFeather
@Hessian I still can't understand how is the zigzag patterns achievable through using dashed lines. This answer is accepted and highly upvoted - but still unclear on usage.Underling
the op didn't want any zig-zag stuff. He wanted a dashed line, the one he showed in the question under the actionbar @SlowAndSteadyHessian
@Hessian When I zoom into that image - the line under the actionbar is not a series of "dashes", but a series of "curves". I don't think this answer correctly resolves that, but perhaps I am misunderstanding something ?Underling
zig zas has no curves. As I said, the op wanted a dashed line @SlowAndSteadyHessian
@Hessian All right, I think I am wrong. The question is ambiguous. The image does not match his requirement in text.Underling
The question is asked for zig-zag line, not dashed line. There is difference. Please zoom the OP image for clarity, it's not dashed line.Camembert

© 2022 - 2024 — McMap. All rights reserved.