Example usage for android.support.v4.util CircularIntArray CircularIntArray

List of usage examples for android.support.v4.util CircularIntArray CircularIntArray

Introduction

In this page you can find the example usage for android.support.v4.util CircularIntArray CircularIntArray.

Prototype

public CircularIntArray() 

Source Link

Document

Creates a circular array with default capacity.

Usage

From source file:android.support.v17.leanback.widget.Grid.java

/**
 * Sets number of rows to fill into. For views that represent a
 * horizontal list, this will be the rows of the view. For views that
 * represent a vertical list, this will be the columns.
 *
 * @param numRows numberOfRows//from w  w  w . j  a va2  s .  co  m
 */
void setNumRows(int numRows) {
    if (numRows <= 0) {
        throw new IllegalArgumentException();
    }
    if (mNumRows == numRows) {
        return;
    }
    mNumRows = numRows;
    mTmpItemPositionsInRows = new CircularIntArray[mNumRows];
    for (int i = 0; i < mNumRows; i++) {
        mTmpItemPositionsInRows[i] = new CircularIntArray();
    }
}