RelativeLayout의 배경으로 설정 한 벡터 드로어 블에 문제가 있습니다. 화면을 가로로 채우지 못합니다.배경 드로잉 벡터가 화면을 채우지 못함
<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>
그리고 아래의 스크린 샷을 : 그것은 게시하는 데 도움이 경우,
<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>
그리고 벡터 그리기 my_drawable : 여기
내 RelativeLayout의 코드입니다. 보시다시피 전체 너비가 채워지지 않습니다.
모든 제안/해결책을 높이 평가했습니다. 일부 패딩을 포함에서 프레임 레이아웃
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/sample"
android:text="Hello World!" />
</FrameLayout>
</RelativeLayout>
이미지가로드되지 않습니다. –