J'ai obtenu une image png avec la couleur transparente, une blanche que je veux utiliser dans un ImageView pour une application Android. You can check that the image has a transparency colorandroid ImageView ne montre pas la transparence
j'ai ajouté l'image pour chacun des dossiers (drawable-MDPI, drawable-LDPI ..) et lié l'ImageView avec l'image. Au lieu d'obtenir une couleur de transparence, j'ai obtenu une couleur blanche comme indiqué ci-dessous The result L'écran bleu est un RelativeLayout avec un arrière-plan. Voici le code 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>
Il y a un triangle d'avertissement jaune en bas à droite de l'image. D'où vient-il? –
Il est dit "Attribut ContentDescription manquant sur l'image" – Mouley
Qu'est-ce que je veux dire est, quel drawable dans votre mise en page a ce triangle en elle? –