Android 垂直对齐右边框附近的造型线

Android 垂直对齐右边框附近的造型线,android,android-drawable,Android,Android Drawable,我很难在可拉丝的右边框附近对齐线条。 我使用这个代码 <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:right="-120dp"> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromDegrees="90" android:t

我很难在可拉丝的右边框附近对齐线条。 我使用这个代码

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item android:right="-120dp">
    <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromDegrees="90" android:toDegrees="90">
        <shape android:shape="line">
            <stroke android:width="1dip" android:color="#000000"/>
        </shape>
    </rotate>
</item>

由于右边框不在120dp的固定位置,因此该线实际上超出了可拉伸范围。如何将其放置在与容器宽度无关的右边框处。

试试这个

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  <item android:top="-1dp" android:bottom="-1dp" android:left="-1dp">
    <shape >
        <stroke
            android:width="1dp"
            android:color="#FFFF" />
    </shape>
  </item>
</layer-list>