Hello !

Alors je débute en dev Android, donc merci d'être indulgent

Voila, j'ai une activité principale avec un linearLayout qui prend tout l'écran, en mode vertical. J'aimerai séparer celui-ci en 2 parties :
1- 3/4 de la partie haute, où figurerait la vue de la caméra (ou de l'appareil photo, c'est pareil je pense)
2- 1/4 du bas pour y placer 3 boutons fixes (eux aussi dans un linearLayout).

Dans le (1), j'aimerai afficher la vue de la caméra (sans forcément enregistrer une vidéo, pour le moment).

Je rencontre 2 soucis (distincts certes):
a- Je n'arrive pas à déplacer (2) tout en bas de l'écran
b- je ne sais pas bien comment m'y prendre pour afficher la vue de l'écran dans (1)

Voici le code de mon fichier main.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
 
    <LinearLayout
        android:id="@+id/layoutCamera"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:baselineAligned="true" >
 
    <!-- Vue caméra --> 
 
    </LinearLayout>    
 
 
    <LinearLayout
        android:id="@+id/layoutMenu"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:baselineAligned="true"
        android:layout_gravity="bottom"  >
 
        <Button
            android:id="@+id/Button1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="bottom"
            android:layout_weight="1"
            android:text="Play" />
 
        <Button
            android:id="@+id/button2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:text="Pause" />
 
        <Button
            android:id="@+id/button3"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:text="Rest Area" />
 
    </LinearLayout>
 
</LinearLayout>
Ce code affiche bien les 3 boutons fixes mais en haut de l'écran ...

Voila si vous avez besoin de données complémentaires dites moi.

Merci pour votre aide