我现在想用shape标签画一个叉号,但是指定android:shape="line"
之后没有发现那个属性是指定画的线的起始和结束位置的。
我用下面的代码画出来的线只能是水平的:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke android:color="@android:color/holo_blue_light"
android:width="3dip" />
</shape>
这个问题怎么整啊?还是shape无法指定这种效果的?
Shape cannot specify position attributes. Width, height, length, coordinates, etc. belong to the properties of the View control. Shape depends on the existence of the View control and cannot exist and be displayed independently
I don’t know what is the length and starting position of the line, but the angle is still ok