Back
Here's the solution you need. I hadn't accurately discerned the keyAt(index) function.
So I'll try with something like this:
for(int i = 0; i < sparseArray.size(); i++) { int key = sparseArray.keyAt(i); // get the object by the key. Object obj = sparseArray.get(key);}
for(int i = 0; i < sparseArray.size(); i++) {
int key = sparseArray.keyAt(i);
// get the object by the key.
Object obj = sparseArray.get(key);
}
31k questions
32.8k answers
501 comments
693 users