【发布时间】:2017-09-25 18:55:27
【问题描述】:
我有一个矢量 drawable 问题,我将它设置为我的 RelativeLayout 的背景。它没有水平填充屏幕。
这是我的 RelativeLayout 的代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/my_drawable">
...
some text views etc.
...
</RelativeLayout>
还有矢量 Drawable my_drawable,如果发布它有帮助的话:
<vector android:height="24dp" android:viewportHeight="110.0"
android:viewportWidth="110.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:name="border_path" android:fillColor="@color/color_1" android:fillAlpha="1"
android:pathData="M105.13,107.51L4.89,107.51A2.38,2.38 99.69,0 1,2.51 105.13L2.51,4.89A2.38,2.38 119.37,0 1,4.89 2.51L105.13,2.51A2.38,2.38 119.37,0 1,107.51 4.89L107.51,105.13A2.38,2.38 99.69,0 1,105.13 107.51z"
android:strokeAlpha="1" android:strokeColor="@color/color_2" android:strokeWidth="5"/>
</vector>
非常感谢任何建议/解决方案!
【问题讨论】:
-
图片未加载
标签: android android-drawable android-relativelayout android-vectordrawable