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.

images dans un spinner

Featured Replies

Posté(e)

Bonjour,

Je souhaiterai ajouter une image aux différents items disponibles dans un spinner.

Voici mon code xml :

<Spinner

android:id="@+id/saisons"

android:layout_width="wrap_content"

android:prompt="@string/prompt"

android:layout_height="wrap_content"

android:entries="@array/saisons"

/>

Et le fichier array.xml :

<?xml version="1.0" encoding="utf-8"?>

<resources>

<array name="saisons">

<item>Printemps</item>

<item>Eté</item>

<item>Automne</item>

<item>Hiver</item>

</array>

</resources>

Je sais que pour les radiobutton, il est possible de modifier l'apparence du bouton grâce à la commande suivante :

android:button="@drawable/hiver" />

Est-ce qu'il est possible de faire la même chose pour les spinner ?

Peut-on ajouter une image à l'item sans modifier l'apparence du bouton de sélection ? (mettre l'image à gauche ou à droite du texte)

Merci ;)

Modifié par guiom056

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.