2010-11-04 3 views
4

Iam essayant de trouver l'id pour le listview, mais il ne fonctionne pas juste en tapant comme ceci: this.view = (ListView) findViewById (R.id.list); R.id.list -> ne fonctionne pas, car il ne trouve pas l'ID Iam en utilisant ma propre liste personnalisée.Liste id pas trouvé: android: liste

 <ListView 
     android:id="@+id/android:list" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" /> 
+0

si vous utilisez un ListActivity vous pouvez appeler getListView() – schwiz

Répondre

12
<ListView 
android:id="@android:id/list" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
</ListView> 

Pour obtenir:

findViewById(android.R.id.list);