2016-08-13 8 views
1

투명 색상 인 png 이미지가 있고, 안드로이드 앱용 ImageView에서 사용하고 싶은 흰색 이미지가 있습니다. You can check that the image has a transparency colorandroid ImageView 투명도가 표시되지 않습니다.

난 (.. 그리기-MDPI, 그리기-LDPI) 폴더의 각각에 화상을 첨가 이미지와 이미지 뷰 연계. 투명도 색상을 얻는 대신 아래 그림과 같이 흰색을 얻었습니다. The result 파란색 화면은 배경이있는 RelativeLayout입니다. 다음은 XML 코드입니다 : 문제가 이미지와 함께있다 있도록

<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_above="@+id/barre_puissance" 
    android:layout_toRightOf="@+id/barre_angle" 
    android:layout_marginLeft="10dp" 
    android:layout_marginBottom="10dp" 
    android:background="@drawable/bg_mr"> 
    <ImageView 
     android:id="@+id/imageView2" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:src="@drawable/ic_mr_projectile" 
     android:layout_centerInParent="true" 
    /> 
</RelativeLayout> 
+0

이미지 오른쪽 하단에 노란색주의 삼각형이 있습니다. 그게 어디서 오는거야? –

+0

"이미지에 contentDescription 특성이 누락되었습니다." – Mouley

+0

내 뜻은 레이아웃의 드로어 블이 그 안에 삼각형이 있는지 여부입니다. –

답변

0

안드로이드 XML은 PNG 파일과 투명성을 지원합니다. png 이미지 파일에 투명성이 있는지 확인하십시오.

+0

오른쪽 (y), 그림이었습니다. 다른 그림으로 바꿔서 주석을 달아 주셨습니다. – Mouley