I see on my graphical layout what I want, center button on the top.
On my emulator my button are on the top left corner.
My xml file:
<?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"
android:layout_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>
Moreover :
When I click on a button, impossible to use an other layout.
Graphical layout is ok, but on my emulator no background for linearlayout and button.
Associated xml file:
<?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>
Sorry for my poor english.
I fixed my problem with a simple clean of my project.