我正在尝试找出如何创建一个只有右边框透明的形状:
+ + + + + + + +
+
+
+
+ + + + + + + +
我想知道如何做到这一点。目前我只有代表矩形的基本形状,但从这一点开始,我不确定是否可能做到我想要的:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#07000000" /> <!-- Transparent background -->
<corners
android:topLeftRadius="10dp"
android:bottomLeftRadius="10dp" />
<stroke
android:width="2dp"
android:color="@android:color/white" />
</shape>
ShapeDrawable
,但是9patch是最简单的方法。 - pskink