Example usage for android.util LongSparseArray setValueAt

List of usage examples for android.util LongSparseArray setValueAt

Introduction

In this page you can find the example usage for android.util LongSparseArray setValueAt.

Prototype

public void setValueAt(int index, E value) 

Source Link

Document

Given an index in the range 0...size()-1, sets a new value for the indexth key-value mapping that this LongSparseArray stores.

Usage

From source file:Main.java

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);
        }/*from  w w w  . j  a  va  2 s .  c  o m*/
    }
}