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.

Problème de dropdown avec une autocompletetextview

Featured Replies

Posté(e)

Bonjour,

J'ai une autocompletetextview dans mon appli dans laquelle je charge dynamiquement la liste de l'adapter.

Cela fonctionne très bien. Mais j'aimerai rajouter quelque chose lorsque le serveur ne me ramène rien. Je fais donc un test sur ma liste, si elle est vide alors j'affiche "no result".

Et la ça coince, car le dropdown s'affiche à peu près 100ms et ensuite il disparait. ( à peine le temps de voir qu'il n'y à pas de résultats :/)

voici mon code :

[...]

                                try {

        // Call host to have list
                                       List list = new ArrayList();
                                       list = callHostToHaveList(search_pattern);

       } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
       }


       //there is suggestions ?
       if(list.size==0){

        Object noSug = new Object (-1);
        noSug.setLabel("No Match");

        list.add(noSug);

       }


      suggestionAdapter = new ZOKAdapter(this, R.layout.xml_dropdown, 
        list);

      // Use to display label in the drop down list
      searchZone.setAdapter(suggestionAdapter);

[...]

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.