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.

[RESOLU] Listview - changer la couleur d'une valeur.

Featured Replies

Posté(e)

Voilà, ça fait un moment que je cherche mais je ne comprends pas/trouve pas comment faire pour changer la couleur/le style etc... d'une item dans une listview (un peu comme dans taskiller avec les ignorés qui s'affichent en bleu)

J'utilise pour le moment un SimpleAdapter pour appliquer mon xml sur les row de la listveiw.

J'ai dans la row de ma listView j'ai 4 textVeiw.

J'aimerai changer la couleur d'un des textVeiw quand celle-ci est en dessous d'un certain nombre mais je ne sais pas comment m'y prendre...

J'espère être clair.

Merci de votre aide.

Modifié par Shadoon

Posté(e)

il faut faire un BaseAdapter, et réimplémenter la fonction getView.

Dans cette fonction tu récupère le layout que tu veux afficher. Si par exemple il y a un texte avec id TOTO

tu peux faire TextView toto = (TextView) layout.findviewbId(R.id.TOTO);

if(....)

toto.setTextColor(...);

Posté(e)
  • Auteur

Ca ne m'était pas venu à l'esprit!

Grand Merci, ça va bien m'aider dans ce que je veux faire!

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.