SparseArray vs HashMap
I can think of several reasons why HashMap s with integer keys are much better than SparseArray s: The Android documentation for a SparseArray says "It is generally slower than a traditional HashMap ". If you write code using HashMap s rather than SparseArray s your code will work with other implementations of Map and you will be able to use all of the Java APIs designed for Maps. If you write code using HashMap s rather than SparseArray s your code will work in non-android projects. Map overrides equals() and hashCode() whereas SparseArray doesn't. Yet whenever I try to use a HashMap with