-1

내 기본 레이아웃은 다음과 같습니다.안드로이드 벡터 배경색 투명

<?xml version="1.0" encoding="UTF-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@android:color/transparent" 
    android:orientation="vertical" 
    android:padding="0dp" 
    tools:context="com.send.apk.bluetoothappsend.MainActivity"> 

    <include 
     android:id="@+id/tool_bar" 
     layout="@layout/tool_bar" /> 

    <android.support.v7.widget.RecyclerView 
     android:id="@+id/rv" 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="1" 
     android:background="@drawable/background" /> 

    <RelativeLayout 
     android:layout_width="match_parent" 
     android:layout_height="@dimen/_80sdp" 
     android:background="@drawable/ic_footer" /> 
</LinearLayout> 

그리고 벡터를, 그림 같은 일부 검은 배경이 존재

<vector xmlns:android="http://schemas.android.com/apk/res/android" 
     android:width="1124dp" 
     android:height="306dp" 
     android:tint="@android:color/transparent" 
     android:viewportWidth="11240.0" 
     android:viewportHeight="3060.0"> 
    <path 
     android:pathData="M179,3046c-111,-20 -146,-55 -166,-170 -17,-96 -18,-1749 -2,-1861 18,-122 69,-172 194,-194 41,-7 417,-11 1126,-11 585,0 1168,-5 1294,-10 330,-14 760,-47 905,-70 415,-63 789,-207 1132,-437 277,-184 448,-251 718,-278 183,-19 297,-19 480,0 270,27 441,94 718,279 370,247 789,400 1238,451 462,52 862,65 2088,65 713,0 1090,4 1131,11 125,22 176,72 194,194 16,112 15,1765 -2,1861 -21,117 -54,150 -171,171 -100,17 -10778,17 -10877,-1z" 
     android:strokeColor="#00000000" 
     android:fillColor="#090b17"/> 
</vector> 

그러나 문제가 다음을 사용, 나는

enter image description here

+0

같은 시도? – user2551017

+0

아니요, 원하는 경우 모든 레이아웃을 첨부하겠습니다. –

+0

그렇다면 앱에서 어두운 테마를 사용하고 있습니까? – user2551017

답변

0

우선 당신이 필요하면 trasparent 배경이 필요 투명한보기를 사용하면 처음에는 벡터 이미지를 사용하지 않아야합니다. 하지만 채우기 색을 #090b17으로 설정하는 것은 #00000000이어야합니다.

양자 택일로, 당신은 할 수 귀하의 RelativeLayout의 배경을 설정할 수 있습니다 :

android:background="@android:color/transparent" 
0

이 RelativeLayout의를 포함하는보기에서 어두운 배경을 사용하여 당신이 될 수이

<?xml version="1.0" encoding="UTF-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@android:color/transparent" 
    android:orientation="vertical" 
    android:padding="0dp" 
    tools:context="com.send.apk.bluetoothappsend.MainActivity"> 

    <include 
     android:id="@+id/tool_bar" 
     layout="@layout/tool_bar" /> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:background="@drawable/background" 
     android:orientation="vertical"> 

     <android.support.v7.widget.RecyclerView 
      android:id="@+id/rv" 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:layout_weight="1" /> 

     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="@dimen/_80sdp" 
      android:background="@drawable/ic_footer" /> 
    </LinearLayout> 


</LinearLayout>