android - how to get all elements of an ArrayAdapter? -


i need elements of arrayadapter of listview.

like this:

    this.array = new arrayadapter<documentodominiabilidade>(getactivity(),             android.r.layout.simple_list_item_1);     this.documentosdominiabilidade.setadapter(array);  // after many operations  this.array.getallelements() // return list of elements???? 

thank you

using adapter.getcount() can know how many items have in adapter, while using adapter.getitem(index) give item.

for(int i=0 ; i<adapter.getcount() ; i++){    object obj = adapter.getitem(i); } 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -