Afiicher du texte avec xml dans exlips android application
Fermé
salah92
Messages postés
246
Date d'inscription
vendredi 27 mars 2009
Statut
Membre
Dernière intervention
5 octobre 2015
-
20 févr. 2013 à 19:13
scinarf Messages postés 1098 Date d'inscription samedi 18 novembre 2006 Statut Membre Dernière intervention 25 septembre 2014 - 21 févr. 2013 à 11:53
scinarf Messages postés 1098 Date d'inscription samedi 18 novembre 2006 Statut Membre Dernière intervention 25 septembre 2014 - 21 févr. 2013 à 11:53
A voir également:
- Afiicher du texte avec xml dans exlips android application
- Dans le texte, un seul mot a réellement été écrit en lettres capitales (majuscules). quel est ce mot ? ✓ - Forum Word
- Mode sécurisé android - Guide
- Télécharger vidéo youtube android - Guide
- Android recovery - Guide
- Formule excel si contient texte alors texte ✓ - Forum Excel
1 réponse
scinarf
Messages postés
1098
Date d'inscription
samedi 18 novembre 2006
Statut
Membre
Dernière intervention
25 septembre 2014
291
21 févr. 2013 à 11:53
21 févr. 2013 à 11:53
Bonjour,
Avec l'ajout d'un Layout, tel qu'un linearlayout ca devrait marcher
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="mon premier texte"
tools:context=".MainActivity" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="mon deuxieme texte"
tools:context=".MainActivity" />
</LinearLayout>
Cela dit, je ne voit pas pourquoi tu précise ton context directement dans le fichier xml
Alors qu'il est déjà fais dans avec le :
setContentView(R.layout.activity_main);
Donc tu peux enlever les tools:context...
Hésite pas si tu as d'autres questions.
Avec l'ajout d'un Layout, tel qu'un linearlayout ca devrait marcher
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="mon premier texte"
tools:context=".MainActivity" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="mon deuxieme texte"
tools:context=".MainActivity" />
</LinearLayout>
Cela dit, je ne voit pas pourquoi tu précise ton context directement dans le fichier xml
Alors qu'il est déjà fais dans avec le :
setContentView(R.layout.activity_main);
Donc tu peux enlever les tools:context...
Hésite pas si tu as d'autres questions.