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.

Taille widget dans un HorizontalScrollView

Featured Replies

Posté(e)

Bonjour. Voici mon code XML :

<?xml version="1.0" encoding="utf-8"?>
   android:layout_height="fill_parent" 
   android:layout_width="fill_parent"
   android:scrollbars="none">

       android:id="@+id/LV_Historique"
       android:layout_height="fill_parent" 
       android:layout_width="fill_parent"/>


En visualisation de ma forme dans l'onglet "Layout" sous Eclipse, je ne comprends pas pourquoi la ListView ne prend pas également toute la largeur de l'écran.

Quelqu'un aurait-il une idée ?

Merci d'avance

Posté(e)

Je cite

"You should never use a HorizontalScrollView with a ListView, since ListView takes care of its own scrolling. Most importantly, doing this defeats all of the important optimizations in ListView for dealing with large lists, since it effectively forces the ListView to display its entire list of items to fill up the infinite container supplied by HorizontalScrollView."

Posté(e)
  • Auteur

Merci pour ta réponse...

Mais je n'arrive pas toujours pas à faire marcher le scroll horizontal sur la "ListView".

Voici mon fichier XML concernant la ListView :

<?xml version="1.0" encoding="utf-8"?>
       android:id="@+id/LV_Test"
       android:layout_height="fill_parent" 
       android:layout_width="wrap_content" 
      android:scrollbars="horizontal|vertical"/>

Voici mon fichier XML concernant l'affichage d'une ligne du ListView :

<?xml version="1.0" encoding="utf-8"?>
       android:layout_height="wrap_content" 
       xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content">
         android:layout_height="wrap_content" 
         android:id="@+id/TV_Test" 
         android:layout_width="wrap_content" 
         android:maxLines="1">

Je veux afficher le texte seulement sur une ligne et si cette dernière est trop longue pouvoir scroller horizontallement pour voir la suite du texte mais je n'y arrive pas pour l'instant...

Quelqu'un a-t-il une idée ?

Merci beaucoup d'avance

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

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.