Bonjour,
J'ai un problème dans mon layout.
Je n'arrive pas à mettre en bas tous les boutons.
Le GlsurfaceView est en haut.
Je ne comprends toujours pas les layout !
Comment mettre en bas les boutons ? android:layout_gravity="bottom" ne semble pas fonctionner !
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/fond" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <android.opengl.GLSurfaceView android:id="@+id/surfaceViewMain" android:layout_width="100px" android:layout_height="100px" android:layout_gravity="center_horizontal"></android.opengl.GLSurfaceView> </LinearLayout> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="bottom"> <Button android:layout_height="wrap_content" android:id="@+id/buttonJouer" android:text="Jouer" android:layout_width="fill_parent" android:layout_marginLeft="@dimen/leftButton" android:layout_marginRight="@dimen/rightButton" android:visibility="visible" android:layout_gravity="center_horizontal"></Button> <Button android:layout_height="wrap_content" android:id="@+id/buttonNiveau" android:text="Choisir niveau" android:layout_width="fill_parent" android:layout_marginLeft="@dimen/leftButton" android:layout_marginRight="@dimen/rightButton" android:layout_gravity="center"></Button> <Button android:layout_height="wrap_content" android:id="@+id/buttonQuitter" android:text="Quitter" android:layout_width="fill_parent" android:layout_marginLeft="@dimen/leftButton" android:layout_marginRight="@dimen/rightButton" android:layout_gravity="center"></Button> </LinearLayout> </LinearLayout>
Partager