Android 之字形布局 [英] Android Zig-Zag layout
本文介绍了Android 之字形布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在 Android 中创建收据布局.想法很简单,一个顶部有锯齿的矩形布局.
即使是,我也试过虚线,但没有任何效果.
<shape xmlns:android="http://schemas.android.com/apk/res/android"机器人:形状=线"><中风机器人:颜色=#FF00"机器人:dashWidth =5dp"android:dashGap="5dp"/></形状>
解决方案
试试这个:
I'm in need of creating a receipt layout in Android. The idea is very simple, a rectangle layout with a zigzag top.
Even, i have tried dashed line but nothing working.
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:color="#FF00"
android:dashWidth="5dp"
android:dashGap="5dp" />
</shape>
解决方案
Try with this: https://github.com/beigirad/ZigzagView
Support top
and bottom
Zigzag.
<ir.beigirad.zigzagview.ZigzagView
android:layout_width="match_parent"
android:layout_height="240dp"
app:zigzagBackgroundColor="#8bc34a"
app:zigzagElevation="8dp"
app:zigzagHeight="10dp"
app:zigzagShadowAlpha="0.9"
app:zigzagSides="top|bottom"
app:zigzagPaddingContent="16dp">
// add child view(s)
</ir.beigirad.zigzagview.ZigzagView>
这篇关于Android 之字形布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文