0

J'ai un comportement étrange avec android.R.layout.simple_dropdown_item_1line en utilisant MultiAutoCompleteTextView.Comportement étrange en utilisant android.R.layout.simple_dropdown_item_1line

Le code que j'utilise est:

contactId = (MultiAutoCompleteTextView) findViewById(R.id.contactId); 
contactAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line,readContacts()); 
contactId.setAdapter(contactAdapter); 
contactId.setThreshold(1); 

Mon fichier de mise en page contient:

<MultiAutoCompleteTextView 
    android:id="@+id/contactId" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:hint="To" 
    android:layout_margin="3dip"> 
</MultiAutoCompleteTextView> 

Mon Emulator show sur fond blanc avec multiAutoCompleteTextView transparent contactList d'info en elle. Pourquoi ai-je un comportement aussi étrange? J'utilise Android 2.2 pour le développement.

+0

Améliorez votre Android 2.2 en cours à nouveau – Robin

Répondre

0

Je l'ai résolu en mettant à jour ma version android

0

j'avais fait face au même problème. le contenu de la dose drop down n'apparaît pas dans un dispositif android 2.2. je devais résoudre le problème par le changement de mise en page drop down

changement:

android.R.layout.simple_dropdown_item_1line 

Pour:

R.layout.support_simple_spinner_dropdown_item 
Questions connexes