List of usage examples for android.util SparseIntArray clear
public void clear()
From source file:com.google.android.flexbox.FlexboxHelper.java
private int[] sortOrdersIntoReorderedIndices(int childCount, List<Order> orders, SparseIntArray orderCache) { Collections.sort(orders);/* www . jav a2 s.co m*/ orderCache.clear(); int[] reorderedIndices = new int[childCount]; int i = 0; for (Order order : orders) { reorderedIndices[i] = order.index; orderCache.append(order.index, order.order); i++; } return reorderedIndices; }