IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Composants graphiques Android Discussion :

Bouton, EditText les uns sur les autres au même endroit


Sujet :

Composants graphiques Android

  1. #1
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2015
    Messages
    92
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2015
    Messages : 92
    Points : 49
    Points
    49
    Par défaut Bouton, EditText les uns sur les autres au même endroit
    Bonjour,
    J'ai un problème : mon fichier XML est constitué de EditText et Boutons qui sont placés tous au même endroit les uns sur les autres et je ne comprends pas pourquoi. J'ai ce problème depuis peu : hier, il affichait proprement et aujourd'hui il affiche comme je l'ai décrit. Voici mon code XML. Pouvez-vous me venir en aide s'il vous plaît ?
    Code xml : 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
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
        android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".dicoAccueil"
        android:id="@+id/relativeLayout">
     
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:id="@+id/edtNom"
            android:text="Nom" />
     
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:id="@+id/edtPrenom"
            android:text="Prenom" />
     
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:id="@+id/edtMetier"
            android:text="Metier"
            />
     
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:inputType="date"
            android:ems="10"
            android:id="@+id/edtDate"
            android:text="Date" />
     
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="20"
            android:inputType="time"
            android:ems="10"
            android:id="@+id/edtHeure"
            android:text="Heure" />
     
        <EditText
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:id="@+id/edtAdress"
            android:text="Adress" />
        <Button
            android:id="@+id/btn_valider"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:text="Valider"
            />
        <Button
            android:id="@+id/btn_retour2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:text="Retour" />
        <Button
            android:id="@+id/btn_effacer"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
     
            android:layout_weight="20"
     
            android:text="Effacer"
            android:layout_above="@+id/btn_valider"
            />
    </RelativeLayout>

  2. #2
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2015
    Messages
    92
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2015
    Messages : 92
    Points : 49
    Points
    49
    Par défaut
    Solution :
    Création d'un <RelativeLayout>
    Création d'un <LinearLayout>

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Div qui s'empilent les uns sur les autres
    Par kelyly dans le forum Mise en page CSS
    Réponses: 1
    Dernier message: 05/07/2010, 10h40
  2. Réponses: 13
    Dernier message: 18/05/2009, 09h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo