SparseArray vs HashMap
I can think of several reasons why HashMaps with integer keys are much better than SparseArrays: The Android documentation for a SparseArray says “It is generally slower than a traditional HashMap“. If you write code using HashMaps rather than SparseArrays your code will work with other implementations of Map and you will be able to … Read more