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 :

Background de mon application


Sujet :

Android

  1. #1
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut Background de mon application
    Bonjour,

    Je sais pas si c'est parce que je me penche dessus de bon matin, mais j'arrive pas à trouver, comment utiliser une image en tant que background de mon application.
    Si vous avez quelques indication je suis preneur

    Edit: J'ai pensé créer un thème, mais je sais pas si c'est la bonne solution, et je cherche des indications sur comment créer un thème, mais je dois chercher mal je trouve strictement rien

  2. #2
    Membre chevronné
    Profil pro
    Inscrit en
    Mars 2011
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2011
    Messages : 322
    Par défaut
    Bonjour,
    Pour mettre une image en fond de ton activité tu peux utiliser la propriété background dans ton layout principal du fichier xml (android:blackground="@drawable/mon_image").

    Après pour les thèmes je ne suis pas trop au courant. Je ne sais pas si ce sont juste des styles ou si c'est plus complexe

  3. #3
    Membre confirmé
    Homme Profil pro
    Lycéen
    Inscrit en
    Mars 2011
    Messages
    64
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Mars 2011
    Messages : 64
    Par défaut
    sans oublier d'ajouter l'image qui nommée mon_image dans le dossier drawble-hdpi qui est inclus dans le dossier res
    bonne journée

  4. #4
    Membre prolifique
    Avatar de Ryu2000
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2008
    Messages
    10 241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2008
    Messages : 10 241
    Par défaut
    Ou alors dans le dossier res/drawable/ tu créer un fichier app_background.xml :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <?xml version="1.0" encoding="utf-8"?>
     
    <bitmap 
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:tileMode="repeat"
        android:src="@drawable/bg6"
    />
    Après dans le fichier xml, tu met ça dans une View :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    android:background="@drawable/app_background"
    Au lieu d'un bitmap tu peux faire des shapes et c'est assez chouette.

  5. #5
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    Okey merci.

    Et au niveau du layout, mes éléments, ils commencent tout en haut de l'écran, du coup pour les centrer verticalement, mais la seule solution que j'ai trouvé, c'est de mettre un margin-top à mon élément qui se trouve tout en haut.
    Je trouve ça moche quand même, vous aurez une idée de solution?

  6. #6
    Membre chevronné
    Profil pro
    Inscrit en
    Mars 2011
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2011
    Messages : 322
    Par défaut
    As tu essayé l'attribut xml android:layout_gravity="center_vertical" ?

  7. #7
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    Oui je l'ai essayé, mais je viens de me rendre compte que j'ai surement pas du le déclarer comme il faut, au lieu de le faire directement dans le fichier xml, j'ai essayé de le faire par le graphical layout que Eclipse nous propose ^^.

    Edit: j'ai essayé mais toujours le même résultat...

  8. #8
    Membre prolifique
    Avatar de Ryu2000
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2008
    Messages
    10 241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2008
    Messages : 10 241
    Par défaut
    Ce qui fonctionne super bien, si t'es dans une relative layout, qui fait tout l'écran (height:match_parent width:match_parent), tu met à ton élément :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    android:layout_centerVertical="true"
    Alors là ça fonctionne à tout les coups.

  9. #9
    Membre chevronné
    Profil pro
    Inscrit en
    Mars 2011
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2011
    Messages : 322
    Par défaut
    Peux tu nous mettre ton fichier XML pour que l'on puisse t'aider. J'ai remarqué également que les layout_gravity ne fonctionnaient pas forcément sur les linearLayout...

  10. #10
    Membre prolifique
    Avatar de Ryu2000
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2008
    Messages
    10 241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2008
    Messages : 10 241
    Par défaut
    Ouais gravity c'est pas top pour ce genre de chose, le mieux c'est clairement une relative layout de la taille de l'écran et ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"

  11. #11
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    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
    <?xml version="1.0" encoding="utf-8"?>
     
    <LinearLayout 
    	xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:orientation="vertical"
        android:background="@drawable/background_appli">
     
     
    	<TextView  
    	    android:layout_width="fill_parent" 
    	    android:layout_height="wrap_content" 
    	    android:text="@string/departement"
    	    android:textColor="#000000" android:layout_marginTop="120dip">
    	</TextView>
     
    	<Spinner 
    		android:id="@+id/departement" 
    		android:layout_width="fill_parent" 
    		android:layout_height="wrap_content">
    	</Spinner>
     
    	<TextView 
    		android:text="@string/ville" 
    		android:layout_width="wrap_content" 
    		android:layout_height="wrap_content"
    		android:textColor="#000000">
    	</TextView>
     
    	<Spinner 
    		android:id="@+id/ville" 
    		android:layout_height="wrap_content" 
    		android:layout_width="fill_parent">
    	</Spinner>
     
    	<TextView  
    	    android:layout_width="fill_parent" 
    	    android:layout_height="wrap_content" 
    	    android:text="@string/auto_ecole"
    		android:textColor="#000000">
    	</TextView>
     
    	<Spinner 
    		android:id="@+id/auto_ecole" 
    		android:layout_width="fill_parent" 
    		android:layout_height="wrap_content">
    	</Spinner>
     
    	 <TextView  
    	    android:layout_width="fill_parent" 
    	    android:layout_height="wrap_content" 
    	    android:text="@string/mdp"
    	    android:textColor="#000000">
    	</TextView>  
     
    	<EditText 
    		android:layout_width="fill_parent" 
    		android:id="@+id/mdp_entre" 
    		android:layout_height="wrap_content">
    	</EditText>
     
    	<Button 
    		android:id="@+id/valider" 
    		android:layout_height="35dip" 
    		android:layout_width="wrap_content" 
    		android:layout_gravity="center"
    		android:text="Valider">
    	</Button>
     
     
    	<LinearLayout 
    		android:layout_width="wrap_content" 
    		android:layout_height="wrap_content" 
    		android:orientation="horizontal" 
    		android:layout_gravity="center">
     
    		<TextView 
    			android:text="@string/develop" 
    			android:gravity="left"
    			android:layout_height="wrap_content" 
    			android:layout_width="wrap_content"
    			android:layout_marginBottom="4dip"
    			android:textColor="#000000">
    		</TextView>
     
    		<ImageView 
    			android:layout_height="wrap_content" 
    			android:id="@+id/logo_webamine" 
    			android:src="@drawable/logo_webamine" 
    			android:layout_width="wrap_content" 
    			android:layout_gravity="center" 
    			android:layout_marginLeft="3dip" android:layout_marginBottom="3dip">
    		</ImageView>
     
    	</LinearLayout>
     
    	<LinearLayout 
    		android:layout_width="wrap_content" 
    		android:layout_height="wrap_content" 
    		android:orientation="horizontal" 
    		android:layout_gravity="center">
     
    		<TextView 
    			android:id="@+id/textView1" 
    			android:layout_height="wrap_content" 
    			android:gravity="right" 
    			android:layout_width="wrap_content" 
    			android:text="@string/groupe" 
    			android:textColor="#000000">
    		</TextView>
     
    		<ImageView 
    			android:layout_height="wrap_content" 
    			android:id="@+id/logo_ediser" 
    			android:src="@drawable/logo_ediser" 
    			android:layout_width="wrap_content" 
    			android:layout_gravity="center" android:layout_marginLeft="3dip">
    		</ImageView>
    	</LinearLayout>
     
    </LinearLayout>
    Je vais essayé de passer sur un relative layout pour voir le rendu que je peux avoir ^^.
    Merci pour vous réponse en tout cas.

  12. #12
    Membre prolifique
    Avatar de Ryu2000
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2008
    Messages
    10 241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2008
    Messages : 10 241
    Par défaut
    J'ai testé ton fichier xml chez moi, si tu veux aligner verticalement tout ton contenu.

    Met ton premier LinearLayout qui contient tout dans une RelativeLayout, et tu dis à ton LinearLayout de s'aligner verticalement et voila !

    En gros c'est ça :
    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
    <?xml version="1.0" encoding="utf-8"?>
     
    <RelativeLayout
    	xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
     
    	<LinearLayout 
    		xmlns:android="http://schemas.android.com/apk/res/android"
    	    android:layout_width="fill_parent"
    	    android:layout_height="fill_parent"
    	    android:layout_weight="1"
    	    android:orientation="vertical"
    	    android:background="@drawable/background_appli"
    	    android:layout_centerVertical="true">
     
     
    		<TextView  
    		    android:layout_width="fill_parent" 
    		    android:layout_height="wrap_content" 
    		    android:text="@string/departement"
    		    android:textColor="#000000">
    		</TextView>
     
    		<Spinner 
    			android:id="@+id/departement" 
    			android:layout_width="fill_parent" 
    			android:layout_height="wrap_content">
    		</Spinner>
     
    		<TextView 
    			android:text="@string/ville" 
    			android:layout_width="wrap_content" 
    			android:layout_height="wrap_content"
    			android:textColor="#000000">
    		</TextView>
     
    		<Spinner 
    			android:id="@+id/ville" 
    			android:layout_height="wrap_content" 
    			android:layout_width="fill_parent">
    		</Spinner>
     
    		<TextView  
    		    android:layout_width="fill_parent" 
    		    android:layout_height="wrap_content" 
    		    android:text="@string/auto_ecole"
    			android:textColor="#000000">
    		</TextView>
     
    		<Spinner 
    			android:id="@+id/auto_ecole" 
    			android:layout_width="fill_parent" 
    			android:layout_height="wrap_content">
    		</Spinner>
     
    		 <TextView  
    		    android:layout_width="fill_parent" 
    		    android:layout_height="wrap_content" 
    		    android:text="@string/mdp"
    		    android:textColor="#000000">
    		</TextView>  
     
    		<EditText 
    			android:layout_width="fill_parent" 
    			android:id="@+id/mdp_entre" 
    			android:layout_height="wrap_content">
    		</EditText>
     
    		<Button 
    			android:id="@+id/valider" 
    			android:layout_height="35dip" 
    			android:layout_width="wrap_content" 
    			android:layout_gravity="center"
    			android:text="Valider">
    		</Button>
     
     
    		<LinearLayout 
    			android:layout_width="wrap_content" 
    			android:layout_height="wrap_content" 
    			android:orientation="horizontal" 
    			android:layout_gravity="center">
     
    			<TextView 
    				android:text="@string/develop" 
    				android:gravity="left"
    				android:layout_height="wrap_content" 
    				android:layout_width="wrap_content"
    				android:layout_marginBottom="4dip"
    				android:textColor="#000000">
    			</TextView>
     
    			<ImageView 
    				android:layout_height="wrap_content" 
    				android:id="@+id/logo_webamine" 
    				android:src="@drawable/logo_webamine" 
    				android:layout_width="wrap_content" 
    				android:layout_gravity="center" 
    				android:layout_marginLeft="3dip" android:layout_marginBottom="3dip">
    			</ImageView>
     
    		</LinearLayout>
     
    		<LinearLayout 
    			android:layout_width="wrap_content" 
    			android:layout_height="wrap_content" 
    			android:orientation="horizontal" 
    			android:layout_gravity="center">
     
    			<TextView 
    				android:id="@+id/textView1" 
    				android:layout_height="wrap_content" 
    				android:gravity="right" 
    				android:layout_width="wrap_content" 
    				android:text="@string/groupe" 
    				android:textColor="#000000">
    			</TextView>
     
    			<ImageView 
    				android:layout_height="wrap_content" 
    				android:id="@+id/logo_ediser" 
    				android:src="@drawable/logo_ediser" 
    				android:layout_width="wrap_content" 
    				android:layout_gravity="center" android:layout_marginLeft="3dip">
    			</ImageView>
    		</LinearLayout>
     
    	</LinearLayout>
    </RelativeLayout>

  13. #13
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    J'ai essayé, j'ai toujours pareil, mais je me rend compte que j'ai du mal m'exprimé.

    En faite, je voudrai qu'il soit au centre centre de l'écran. Mes éléments sont déjà aligné verticalement. C'est juste que j'aurai aimé que le contenue soient aux centre parce que si je met pas de margin-top, le logo de l'entreprise est caché...

  14. #14
    Membre prolifique
    Avatar de Ryu2000
    Homme Profil pro
    Étudiant
    Inscrit en
    Décembre 2008
    Messages
    10 241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Décembre 2008
    Messages : 10 241
    Par défaut
    Il faudrait des screenshots de l'application parce que je comprend pas du tout.

  15. #15
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    Donc mon appli à la base était comme ca

    layout non centré

    Mais je voulais que les champs se trouvent aux centre, j'ai essayé center vertical, mais rien, du coup j'ai mi un margin-top pour obtenir ca

    layout centré

  16. #16
    Membre chevronné
    Profil pro
    Inscrit en
    Mars 2011
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2011
    Messages : 322
    Par défaut
    Et avec ça, ça donne quoi ?

    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
    <?xml version="1.0" encoding="utf-8"?>
     
    <LinearLayout 
    	xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="horizontal"
        android:background="@drawable/background_appli">
     
     <LinearLayout 
    	xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_gravity="center_vertical">
    	<TextView  
    	    android:layout_width="fill_parent" 
    	    android:layout_height="wrap_content" 
    	    android:text="@string/departement"
    	    android:textColor="#000000" android:layout_marginTop="120dip">
    	</TextView>
     
    	<Spinner 
    		android:id="@+id/departement" 
    		android:layout_width="fill_parent" 
    		android:layout_height="wrap_content">
    	</Spinner>
     
    	<TextView 
    		android:text="@string/ville" 
    		android:layout_width="wrap_content" 
    		android:layout_height="wrap_content"
    		android:textColor="#000000">
    	</TextView>
     
    	<Spinner 
    		android:id="@+id/ville" 
    		android:layout_height="wrap_content" 
    		android:layout_width="fill_parent">
    	</Spinner>
     
    	<TextView  
    	    android:layout_width="fill_parent" 
    	    android:layout_height="wrap_content" 
    	    android:text="@string/auto_ecole"
    		android:textColor="#000000">
    	</TextView>
     
    	<Spinner 
    		android:id="@+id/auto_ecole" 
    		android:layout_width="fill_parent" 
    		android:layout_height="wrap_content">
    	</Spinner>
     
    	 <TextView  
    	    android:layout_width="fill_parent" 
    	    android:layout_height="wrap_content" 
    	    android:text="@string/mdp"
    	    android:textColor="#000000">
    	</TextView>  
     
    	<EditText 
    		android:layout_width="fill_parent" 
    		android:id="@+id/mdp_entre" 
    		android:layout_height="wrap_content">
    	</EditText>
     
    	<Button 
    		android:id="@+id/valider" 
    		android:layout_height="35dip" 
    		android:layout_width="wrap_content" 
    		android:layout_gravity="center"
    		android:text="Valider">
    	</Button>
     
     
    	<LinearLayout 
    		android:layout_width="wrap_content" 
    		android:layout_height="wrap_content" 
    		android:orientation="horizontal" 
    		android:layout_gravity="center">
     
    		<TextView 
    			android:text="@string/develop" 
    			android:gravity="left"
    			android:layout_height="wrap_content" 
    			android:layout_width="wrap_content"
    			android:layout_marginBottom="4dip"
    			android:textColor="#000000">
    		</TextView>
     
    		<ImageView 
    			android:layout_height="wrap_content" 
    			android:id="@+id/logo_webamine" 
    			android:src="@drawable/logo_webamine" 
    			android:layout_width="wrap_content" 
    			android:layout_gravity="center" 
    			android:layout_marginLeft="3dip" android:layout_marginBottom="3dip">
    		</ImageView>
     
    	</LinearLayout>
     
    	<LinearLayout 
    		android:layout_width="wrap_content" 
    		android:layout_height="wrap_content" 
    		android:orientation="horizontal" 
    		android:layout_gravity="center">
     
    		<TextView 
    			android:id="@+id/textView1" 
    			android:layout_height="wrap_content" 
    			android:gravity="right" 
    			android:layout_width="wrap_content" 
    			android:text="@string/groupe" 
    			android:textColor="#000000">
    		</TextView>
     
    		<ImageView 
    			android:layout_height="wrap_content" 
    			android:id="@+id/logo_ediser" 
    			android:src="@drawable/logo_ediser" 
    			android:layout_width="wrap_content" 
    			android:layout_gravity="center" android:layout_marginLeft="3dip">
    		</ImageView>
    	</LinearLayout>
    </LinearLayout>
    </LinearLayout>

  17. #17
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    Le même résultat que mon image layout centré ^^.

    Mais c'est bon, te tracasse pas plus, c'était juste histoire de savoir si je pouvais faire quelque chose de plus propre que l'utilisation de margintop

  18. #18
    Membre chevronné
    Profil pro
    Inscrit en
    Mars 2011
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2011
    Messages : 322
    Par défaut
    Citation Envoyé par malgache Voir le message
    Le même résultat que mon image layout centré ^^.

    Mais c'est bon, te tracasse pas plus, c'était juste histoire de savoir si je pouvais faire quelque chose de plus propre que l'utilisation de margintop
    C'est pas justement ça que tu voulais obtenir ?

    Edit : à mince dans l'exemple que j'ai mis il faut enlever le marginTop de ton TextView

  19. #19
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    Oui il y a toujours le marginTop dans le code que tu m'as montré ^^.

    Mais merci quand même

  20. #20
    Membre chevronné
    Homme Profil pro
    IUT Informatique
    Inscrit en
    Mars 2011
    Messages
    412
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : IUT Informatique

    Informations forums :
    Inscription : Mars 2011
    Messages : 412
    Par défaut
    Waoow, je ne sais pas quel tour de magie j'ai réussi à faire mais la j'ai réussi.

    J'ai enlevé le marginTop, tout était remonté, j'avais essayé de mettre comme gravity center_vertical pour mon linearLayout, en vain, j'ai mis un bottom pour voir, il s'est mis tout en bas de ma fenêtre, et j'ai remis center_vertical et tadannnnnn il s'est mis au centre comme un grand

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Création d'un alias via mon application
    Par Neilos dans le forum C++Builder
    Réponses: 3
    Dernier message: 18/10/2003, 23h29
  2. Comment faire générer du rtf par mon application?
    Par nickylarson dans le forum C++Builder
    Réponses: 3
    Dernier message: 13/08/2003, 09h35
  3. [Access] Mon application est détruite !!!
    Par mathias dans le forum Access
    Réponses: 4
    Dernier message: 26/06/2003, 14h14
  4. Réponses: 7
    Dernier message: 26/06/2003, 09h11
  5. Impossible de quitter mon application!
    Par Bouillou dans le forum C++Builder
    Réponses: 4
    Dernier message: 12/11/2002, 20h43

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