Problème layout sous activité
Le layout du main ne pose aucun soucis, background sur le fond et sur les bouton ok, mais sous les sous activités les backgrounds ne marchent pas.
Si je passe en mode graphique sur les layouts ça semble marcher mais sur l'émulateur non.
De plus si je code mon layout dans ma classe et non dans un fichier xml ça passe.
main.xml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/mairie01"
android:gravity="center_horizontal" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/decourvrir1" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/schedule" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/decouvrir2" />
</LinearLayout> |
layout de la sous activité
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/mairie01">
<Button
android:id="@+id/manger"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/eat" />
<Button
android:id="@+id/dormir"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/autres"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout> |