Pierre87 Posted February 11, 2010 Share Posted February 11, 2010 J'ai fait un layout ajustable, basé sur des "weight" extrait : android:id="@+id/clickLayout" android:layout_width="fill_parent" android:layout_height="40dp" android:orientation="horizontal"> class="org.pierre.remotedroid.client.view.ClickView" android:id="@+id/leftClickView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="2" /> class="org.pierre.remotedroid.client.view.ClickView" android:id="@+id/middleClickView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" /> class="org.pierre.remotedroid.client.view.ClickView" android:id="@+id/rightClickView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="2" /> Je voulais que la View du centre soit plus petite que celle de droite et de gauche. Bizarrement, c'est l'inverse qui se produit ! Elle est beaucoup plus large. Je me suis dit que j'avais mal interprété le sens de "weight", et j'ai fait un layout avec des weight : 1 2 3 Alors là, mon Layout explose complètement, et seule les 2 premières View sont visibles... Je me trompe quelque part ? Quote Link to comment Share on other sites More sharing options...
Cyril Mottier Posted February 12, 2010 Share Posted February 12, 2010 Il ne faut pas mettre fill_parent mais 0dip dans tes layout_width Quote Link to comment Share on other sites More sharing options...
Pierre87 Posted February 12, 2010 Author Share Posted February 12, 2010 Merci ! Je crois que je suis juste derriere toi :p Quote Link to comment Share on other sites More sharing options...
Cyril Mottier Posted February 13, 2010 Share Posted February 13, 2010 Merci ! Je crois que je suis juste derriere toi :p Tout simplement MDR :D. Il fallait me le dire quand tu m'as vu répondre, je t'aurais expliqué plus en détail et puis on aurait discuter un peu plus que via le forum ! Quote Link to comment Share on other sites More sharing options...
Pierre87 Posted February 13, 2010 Author Share Posted February 13, 2010 je suis timide :P mais maintenant j'ai compris comment ça fonctionne il faut mettre 0dp quand on veux que ça s'ajuste automatiquement Quote Link to comment Share on other sites More sharing options...
Pierre87 Posted February 14, 2010 Author Share Posted February 14, 2010 http://www.flickr.com/photos/ulife/4353643868/ en haut à droite, en noir Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.