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

Android Discussion :

Comment mettre un LinearLayout dans un autre LinearLayout


Sujet :

Android

  1. #1
    Membre à l'essai
    Femme Profil pro
    etudiante
    Inscrit en
    Février 2012
    Messages
    7
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : etudiante
    Secteur : Enseignement

    Informations forums :
    Inscription : Février 2012
    Messages : 7
    Points : 11
    Points
    11
    Par défaut Comment mettre un LinearLayout dans un autre LinearLayout
    bonjour,

    J'ai essayé de créer un CV sous Android mais seuls les titres apparaissent. Je ne vois pas où est ma faute.
    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
    <TableRow
                    android:id="@+id/tableRow5"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" >
                 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
              <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal" >
     
     
                    <ImageButton android:id="@+id/imagebuttonil"
                    android:src="@drawable/ic_launcher"
                    android:layout_width="50px"
                    android:layout_height="50px"/>
                   <TextView android:id="@+id/il"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:typeface="serif"
                    android:textColor="#000000"
                     android:paddingLeft="20px"
                    android:textStyle="bold" 
                    android:shadowColor="#9370D8"
                   android:text="INFORMATIQUE ET LANGUAGE"/>
               </LinearLayout>
              <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:orientation="horizontal" >
                     <EditText
                   android:id="@+id/Editfrmil"
                   android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
                   android:textSize="20px" 
                    android:textColor="#000000"/>
                     <ImageButton android:id="@+id/imagebuttonil"
                   android:src="@drawable/ic_launcher"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"/></LinearLayout></LinearLayout>
     
     
     
     
                </TableRow>
    Pouvez vous m'aider ?

    Merci d'avance

  2. #2
    Membre habitué Avatar de eric-m
    Homme Profil pro
    Chef de projet MOA
    Inscrit en
    Mars 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Chef de projet MOA
    Secteur : Transports

    Informations forums :
    Inscription : Mars 2011
    Messages : 62
    Points : 145
    Points
    145
    Par défaut
    Tout les LinearLayout ont des attributs match_parent, donc le premier LinearLayout horizontal remplit tout l'écran et le deuxième n'a plus de place pour s'afficher.


    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
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        	android:layout_width="wrap_content"
        	android:layout_height="wrap_content"
              android:orientation="horizontal" >
    <ImageButton..........
    <TextView..........
        </LinearLayout>
              <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:orientation="horizontal" >
     <EditText .........
     <ImageButton.........
    ..........

Discussions similaires

  1. Réponses: 13
    Dernier message: 03/10/2007, 11h25
  2. Comment mettre un lien dans une page vers une autre partie de la même page?
    Par Longway dans le forum Dépannage et Assistance
    Réponses: 4
    Dernier message: 12/10/2006, 18h58
  3. Réponses: 12
    Dernier message: 27/06/2005, 19h06
  4. COMMENT METTRE 2 CHAMPS DANS LE MEME DBLOOKUPCOMBOBOX
    Par ledevelopeur dans le forum Bases de données
    Réponses: 2
    Dernier message: 27/07/2004, 15h15
  5. Réponses: 2
    Dernier message: 28/08/2003, 00h00

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