Aller au contenu
View in the app

A better way to browse. Learn more.

Forum de Frandroid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

layout weight bizarre

Featured Replies

Posté(e)

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 ?

Posté(e)
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 !

Posté(e)
  • Auteur

je suis timide :P

mais maintenant j'ai compris comment ça fonctionne

il faut mettre 0dp quand on veux que ça s'ajuste automatiquement

Rejoignez la conversation

Vous pouvez poster maintenant et vous enregistrez plus tard. Si vous avez un compte, connectez-vous maintenant pour poster.

Invité
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Répondre à ce sujet…

Account

Navigation

Rechercher

Rechercher

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.