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 :

Probleme affichage LinearLayout


Sujet :

Android

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    367
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 367
    Par défaut Probleme affichage LinearLayout
    Bonjour

    dans une appli
    J'ai un LinearLayout qui contient 5 LinearLayout
    en vue Laout j'en ai seulement 4 d'affichés
    Voici le code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
    Pouvez-vous m'indiquer l'erreur
    Merci
    JCM

  2. #2
    Rédacteur
    Avatar de MrDuChnok
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2002
    Messages
    2 112
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Juin 2002
    Messages : 2 112
    Par défaut
    Peux tu nous donner le code complet de ton XML ?

    Merci

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    367
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 367
    Par défaut
    Voici mon code (je veux faire un pavé numérique de saisie) :
    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
    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
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
    	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    		android:orientation="horizontal"
    	    android:layout_width="fill_parent"
    	    android:layout_height="wrap_content"	
    	>
    	<EditText android:id="@+id/EditText01"
    		android:layout_width="wrap_content"
    		android:layout_height="wrap_content"
    		android:textSize="20px"
    		android:editable="false"
    		android:cursorVisible="false"	
    		/>
    		<Button android:id="@+id/buttonOK"
    	    	android:text="OK"
    			android:layout_width="wrap_content"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			android:textStyle="bold"
    			android:textSize="20px" 
    			/> 
    	</LinearLayout>
    	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    	    android:orientation="horizontal"
    	    android:layout_width="fill_parent"
    	    android:layout_height="wrap_content"
    	    > 
    	    <Button android:id="@+id/button1"
    	    	android:text="1"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			android:textStyle="bold"
    			android:textSize="20px" 
    			/> 
    		<Button android:id="@+id/button2"
    	    	android:text="2"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			android:textStyle="bold"
    			android:textSize="20px" 
    			/> 
    		<Button android:id="@+id/button3"
    	    	android:text="3"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			android:textStyle="bold"
    			android:textSize="20px" 
    			/> 		
    	</LinearLayout>
    	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    	    android:orientation="horizontal"
    	    android:layout_width="fill_parent"
    	    android:layout_height="wrap_content"
    	    > 
    	    <Button android:id="@+id/button4"
    	    	android:text="4"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			android:textStyle="bold"
    			android:textSize="20px"
    			/> 
    		<Button android:id="@+id/button5"
    	    	android:text="5"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			android:textStyle="bold"
    			android:textSize="20px"
    			/> 
    		<Button android:id="@+id/button6"
    	    	android:text="6"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			android:textStyle="bold"
    			android:textSize="20px"
    			/> 
    	</LinearLayout>
    	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    	    android:orientation="horizontal"
    	    android:layout_width="fill_parent"
    	    android:layout_height="wrap_content"
    	    > 
    	    <Button android:id="@+id/button7"
    	    	android:text="7"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			/> 
    		<Button android:id="@+id/button8"
    	    	android:text="8"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			/> 
    		<Button android:id="@+id/button9"
    	    	android:text="9"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			/> 
    	</LinearLayout>
    	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    	    android:orientation="horizontal"
    	    android:layout_width="fill_parent"
    	    android:layout_height="wrap_content"
    	    >
     		<Button android:id="@+id/buttonPoint"
    	    	android:text="."
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			/>	    
    	    <Button android:id="@+id/button0"
    	    	android:text="0"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			/> 
    		<Button android:id="@+id/buttonC"
    	    	android:text="C"
    			android:layout_width="fill_parent"
    			android:layout_height="wrap_content"
    			android:layout_weight="1"
    			/> 
    	</LinearLayout> 
    </LinearLayout>
    D'autre part

    Je voudrais que le buttonC efface le dernier chiffre saisi
    et que le buttonOK qui affiche le montant dans le EditText01 transforme ce montant en variable pour pouvoir le rentrer dans une table SQLite

    Est-ce possible ?
    Merci pour ton aide
    JCM

  4. #4
    Expert confirmé

    Avatar de Feanorin
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    4 589
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 4 589
    Par défaut
    Bonjour,

    J'ai testé ton fichier xml sur l'emulateur et le layout s'affiche bien chez moi !
    Après tu peux toujours mettre un scroll si tu veux .

    Je voudrais que le buttonC efface le dernier chiffre saisi
    et que le buttonOK qui affiche le montant dans le EditText01 transforme ce montant en variable pour pouvoir le rentrer dans une table SQLite

    Est-ce possible ?
    Oui, C'est possible .

  5. #5
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    367
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 367
    Par défaut
    Oui c'est tout a fait cela

    JCM

  6. #6
    Expert confirmé

    Avatar de Feanorin
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    4 589
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 4 589
    Par défaut
    EditText de java te propose de récupérer le texte via la fonction GetText de cet objet.

    Après tu n'as qu'a transformer la chaine en entier, float ou double via les parses puis de l'insérer dans la base sql que tu auras créer.

    Regarde du côté de ce site tu auras toutes les infos

    http://developer.android.com/index.html

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

Discussions similaires

  1. []probleme affichage valeur dans combobox
    Par gup dans le forum VB 6 et antérieur
    Réponses: 5
    Dernier message: 23/09/2005, 09h22
  2. Probleme affichage de mon site
    Par Braq dans le forum Webdesign & Ergonomie
    Réponses: 15
    Dernier message: 10/08/2005, 14h08
  3. problem affichage avec HTML::TableExtract
    Par rootdaoud dans le forum Web
    Réponses: 2
    Dernier message: 04/07/2005, 19h35
  4. Probleme affichage noir quand Build/Compile
    Par balabi dans le forum MFC
    Réponses: 3
    Dernier message: 01/06/2005, 16h12
  5. Probleme affichage dans tableau selon requête
    Par moulette85 dans le forum Langage SQL
    Réponses: 11
    Dernier message: 01/03/2005, 15h44

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