0
正在虚线创建垂直线。放置View/ImageView宽度5dp或一些东西和宽度100dp,并与此不显示垂直虚线。如果我放置100dp高度和100dp宽度然后它显示虚线。所以它占用99dp空白Android - 虚线垂直线的可绘制宽度
我需要2DP或5DP宽度和高度100dp虚线
这里是我的代码:
dash_line.xml
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="90"
android:toDegrees="90">
<shape
android:shape="line">
<stroke
android:color="@color/white"
android:dashWidth="10px"
android:dashGap="10px"
android:width="1dp"/>
<size android:height="300dp" />
</shape>
</rotate>
and
破折号+空间非常小的图像<ImageView
android:id="@+id/imageview"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="100dp"
android:src="@drawable/dash_line"
android:layout_gravity="center_horizontal" />
其不重复的位图 – srinu
尝试编辑答案与视图!并让我知道它是否会有所帮助! – Rahul
是完美的,它与查看 – srinu