这是我的9补丁(我称之为/res/drawable/stripes_vert_4.9.png):
< = LOOK!它在这里!它的尺寸为14 * 5像素,包括边框.重量:205个字节 这是设置为背景时的结果: 现在是一个半透明的渐变(我称之为/ res / drawable / bg_stripes_vert_gradient):
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
android:startColor="#0000"
android:endColor="#8000"
android:gradientRadius="180"
android:type="linear"
android:angle="-90"
/>
使用start | center | endColor进行游戏以获得最佳平衡.
现在,布局:
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/stripes_vert_4"
>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_stripes_vert_gradient"
/>
最终的结果是: