I need get all elements of ArrayAdapter of an 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 a List of Elements????
thank you
Using Adapter.getCount()
you can know how many items you have in the adapter, while using Adapter.getItem(index)
will give you the item.
for(int i=0 ; i<adapter.getCount() ; i++){
Object obj = adapter.getItem(i);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With