Java tutorial
//package com.java2s; import android.content.res.ColorStateList; import android.util.LongSparseArray; public class Main { private static void clearColorStateListArray(LongSparseArray<ColorStateList> spArray) { if (spArray != null) { int size = spArray.size(); for (int i = 0; i < size; i++) { spArray.setValueAt(i, null); } } } }