当我使用Android虚线时,在小屏幕上运行良好,但在三星S3设备和更高版本中无法正常工作。
截图
以及
drawable/dashline.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line" >
<stroke
android:dashWidth="20sp"
android:dashGap="20sp"
android:width="2dp"
android:color="#FF0000" />
</shape>
XML
<ImageView
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="6dp"
android:background="@drawable/dash_line" />
如果有人能在这方面帮助我,任何想法都会受到赞赏。