Jorodan Posté(e) 10 novembre 2009 Posté(e) 10 novembre 2009 Bonjour les jeunes! Je gère un écran avec 3 Spinners. Une ligne avec 2 spinners et une ligne avec 1 spinner. Mon problème est le suivant : J'aimerai que les deux spinners du centre se répartissent de part et d'autre du milieu de l'écran. Et celui du bas au milieu! Mon idée première : Les deux du haut dans un LinearLayout avec une gravité "horizontal_center". Pour le deuxième, une simple gravité "horizontal_center". Vous avez compris... ça ne marche pas... Quelqu'un a une idée ?? :'( Citer
popolbx Posté(e) 10 novembre 2009 Posté(e) 10 novembre 2009 tablelayout.....pensez html :p -- Posté depuis BBFoC HTC Magic/sapphire Citer
Jorodan Posté(e) 10 novembre 2009 Auteur Posté(e) 10 novembre 2009 C'est nuuuul le HTML :P Merci, je vais voir de ce coté ;) Citer
Jorodan Posté(e) 10 novembre 2009 Auteur Posté(e) 10 novembre 2009 Ca marche pas :'( Les spinners sont alignés à gauche! <?xml version="1.0" encoding="utf-8"?> xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"> android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > android:id="@+id/reseaugauche" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:src="@drawable/flechegauche"> android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Nom réseau" android:layout_centerHorizontal="true" android:gravity="center"> android:id="@+id/reseaudroite" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:src="@drawable/flechedroite"> android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"> android:id="@+id/ligne" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal"> android:id="@+id/typehoraires" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal"> android:id="@+id/arret" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:layout_span="2"> android:layout_width="fill_parent" android:layout_height="25px" android:text="Prochain passage" android:gravity="center" android:background="#4F81BD"> android:id="@+id/prochainpassage" android:layout_width="fill_parent" android:layout_height="25px" android:text="prochain horaire" android:gravity="center" android:background="#9BBB59"> android:layout_width="fill_parent" android:layout_height="25px" android:text="Horaires complets" android:gravity="center" android:background="#4F81BD"> android:layout_width="fill_parent" android:layout_height="fill_parent"> android:id="@+id/llhoraires" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="center_horizontal" > Citer
popolbx Posté(e) 10 novembre 2009 Posté(e) 10 novembre 2009 mets un width de 160dip....ça fait la moitié de lécran, et le gros spin colle lui 320dip Citer
Jorodan Posté(e) 10 novembre 2009 Auteur Posté(e) 10 novembre 2009 Rhoooo, je voulais éviter pour être 100% adaptable à n'importe quel écran! Mince, il n'y a pas d'autres solution ?? :'( Citer
Jorodan Posté(e) 10 novembre 2009 Auteur Posté(e) 10 novembre 2009 Ca marche... mais je chercher encore pourquoi ça ne marchait pas avant... <?xml version="1.0" encoding="utf-8"?> xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" /> android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > android:id="@+id/reseaugauche" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:src="@drawable/flechegauche" /> android:id="@+id/nomreseau" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Nom réseau" android:layout_centerHorizontal="true" android:gravity="center" /> android:id="@+id/reseaudroite" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:src="@drawable/flechedroite" /> android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"> android:id="@+id/ligne" android:layout_width="wrap_content" android:layout_height="wrap_content" /> android:id="@+id/typehoraires" android:layout_width="wrap_content" android:layout_height="wrap_content" /> android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"> android:id="@+id/arret" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" /> android:layout_width="fill_parent" android:layout_height="25px" android:text="Prochain passage" android:gravity="center" android:background="#4F81BD" /> android:id="@+id/prochainpassage" android:layout_width="fill_parent" android:layout_height="25px" android:text="prochain horaire" android:gravity="center" android:background="#9BBB59" /> android:layout_width="fill_parent" android:layout_height="25px" android:text="Horaires complets" android:gravity="center" android:background="#4F81BD" /> android:layout_width="fill_parent" android:layout_height="fill_parent"> android:id="@+id/llhoraires" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="center_horizontal" /> Citer
popolbx Posté(e) 10 novembre 2009 Posté(e) 10 novembre 2009 oui d'ailleurs un fill parent sur deux cellukes ça soit prendre l ecran tout seul... Citer
Fluckysan Posté(e) 12 novembre 2009 Posté(e) 12 novembre 2009 Rhoooo, je voulais éviter pour être 100% adaptable à n'importe quel écran!Mince, il n'y a pas d'autres solution ?? :'( Les tailles en dip s'adaptent à toutes les résolutions nop (Sinon j'ai mal lus l'article de popolbx :s) ? Citer
Jorodan Posté(e) 12 novembre 2009 Auteur Posté(e) 12 novembre 2009 "Taille en dip" ?? A part la taille en pixel je connais pas d'autre possibilité... Citer
popolbx Posté(e) 12 novembre 2009 Posté(e) 12 novembre 2009 LIS LES TUTORIAUX sur le HTC Tattoo !! :mad: :mad: :mad: https://www.frandroid.com/5903/preparez-vos-applications-pour-le-htc-tattoo-12/ https://www.frandroid.com/6038/preparez-vos-applications-pour-le-htc-tattoo-22/ Citer
Jorodan Posté(e) 12 novembre 2009 Auteur Posté(e) 12 novembre 2009 Mais heuuuu j'ai pas de Tattoo et mon application est pas finie donc j'avais pas envisager de la faire tourner sur le Tattoo!!! Citer
popolbx Posté(e) 12 novembre 2009 Posté(e) 12 novembre 2009 non mais le tuto peu servir pour tout Citer
Fluckysan Posté(e) 12 novembre 2009 Posté(e) 12 novembre 2009 (modifié) Si tu penses à ce que ton appli soit "100% adaptable à tous les écrans", tu penses forcément au Tattoo ;) Le tuto parle de portabilité des applis (au nivrau graphique) ! C'est pile dans ce que tu veux faire :D Modifié 12 novembre 2009 par Fluckysan Citer
popolbx Posté(e) 12 novembre 2009 Posté(e) 12 novembre 2009 ou alors il pense que archos pour choper la réduc ^^ Citer
Jorodan Posté(e) 12 novembre 2009 Auteur Posté(e) 12 novembre 2009 Popolbx a lis dans mes pensées XD Le Tattoo viendra dans un second temps :D Citer
Recommended Posts
Rejoignez la conversation
Vous pouvez poster maintenant et vous enregistrez plus tard. Si vous avez un compte, connectez-vous maintenant pour poster.