[Question] Afficher une image
Bonjour, je commence le développement sous Android et j'ai un petit soucis au niveau de l'affichage. Je veux afficher du texte, suivi d'une image. Le soucis est qu'à la compilation de mon code source, il n'y a que le texte qui s'affiche, mais pas l'image et je n'ai aucune erreur indiquée...
La question que je me pose est: Est-ce qu'il n'y aurait pas une ligne qui manque dans mon fichier JAVA pour afficher l'image en question?
J'ai juste touché au fichier XML:
Est-ce que vous auriez une solution à ça?
Merci.
La question que je me pose est: Est-ce qu'il n'y aurait pas une ligne qui manque dans mon fichier JAVA pour afficher l'image en question?
J'ai juste touché au fichier XML:
- Code: Select All Code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center_vertical|center_horizontal"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"
/>
<imageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal"
android:src="@drawable/android"
/>
</LinearLayout>
Est-ce que vous auriez une solution à ça?

Samsung Galaxy Nexus 4.1.1 + root
Asus Eee Pad Transformer 16 Go 4.0.3
Asus Eee Pad Transformer 16 Go 4.0.3
-
JeremX Gamer Hardcore
- Messages: 663
- Inscription: 28 Jan 2011, 10:53
- Localisation: Alsace
- Prénom: Jeremy
- Pays: France
- Sexe: Homme