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.

Créer un alertDialog avec une liste de choix

Featured Replies

Posté(e)

Bonjour à tous

J'aimerai créer un AlertDialog avec une liste de choix comme l'image ci dessous mais sans layout.xml

post-86461-0-91592000-1325957400_thumb.p

Avec le code suivant ca ne marche pas pourquoi?

case SELECTIONNER_GPX_DIALOG:
		 AlertDialog.Builder builder1 = new AlertDialog.Builder(this);

		 final CharSequence languages[] = {"Chinese", "Spanish", "English",  "Arabic", "Hindi"};
		factory1.inflate(R.layout.selection_gpx_dialog, null);

		 // On définit le message à afficher dans la boite de dialogue
			builder1.setMessage("Sélectionner un fichier GPX ")
			   .setTitle("GPX")
			   .setItems(languages,  new DialogInterface.OnClickListener() {
					   public void onClick(DialogInterface dialog,int id) {
					   // get selected item and close the dialog
						Toast.makeText(getApplicationContext(), "essais", Toast.LENGTH_LONG).show();
					   }
				   });

			dialog = builder1.create();
			   break;

le but étant de la mettre à jour en fonction d'une liste.

Merci

Modifié par j.scheuner

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.