Bonjour,
J'ai une image dans mon fichier drawable (mis à la main) mais, pas utilisable.
J'ai ceci
Et ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 <ImageView android:id="@+id/imageView" android:layout_width="80dp" android:layout_height="77dp" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:layout_marginBottom="16dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" android:src="@drawable/avatar12" />
mais l'application crash. Avez vous ce problème ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 ImageView image = (ImageView)findViewById(R.id.imageView); image.setImageResource(R.drawable.avatar12);
Partager