Home
last modified time | relevance | path

Searched refs:mSpanIndexCache (Results 1 – 2 of 2) sorted by relevance

/frameworks/support/v7/recyclerview/src/android/support/v7/widget/
DGridLayoutManager.java818 final SparseIntArray mSpanIndexCache = new SparseIntArray(); field in GridLayoutManager.SpanSizeLookup
846 mSpanIndexCache.clear(); in invalidateSpanIndexCache()
862 final int existing = mSpanIndexCache.get(position, -1); in getCachedSpanIndex()
867 mSpanIndexCache.put(position, value); in getCachedSpanIndex()
902 if (mCacheSpanIndices && mSpanIndexCache.size() > 0) { in getSpanIndex()
905 span = mSpanIndexCache.get(prevKey) + getSpanSize(prevKey); in getSpanIndex()
927 int hi = mSpanIndexCache.size() - 1; in findReferenceIndexFromCache()
931 final int midVal = mSpanIndexCache.keyAt(mid); in findReferenceIndexFromCache()
939 if (index >= 0 && index < mSpanIndexCache.size()) { in findReferenceIndexFromCache()
940 return mSpanIndexCache.keyAt(index); in findReferenceIndexFromCache()
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DGridLayoutManagerTest.java689 assertTrue("some positions should be cached", ssl.mSpanIndexCache.size() > 0); in notifyDataSetChange()
694 assertEquals("cache should be empty", 0, ssl.mSpanIndexCache.size()); in notifyDataSetChange()
701 assertTrue("some items should be cached", ssl.mSpanIndexCache.size() > 0); in notifyDataSetChange()
791 assertTrue("cache should be filled", mGlm.mSpanSizeLookup.mSpanIndexCache.size() > 0); in cacheSpanIndices()