Best code examples for Android SparseArray class (android.util.SparseArray)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SparseArray class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android SparseArray examples from Open Source projects
This code example shows how to use the following methods:
50:	private final SparseArray<IssueFragment> fragments = new SparseArray<IssueFragment>(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: saveHierarchyState
183:	SparseArray<Parcelable> viewStates = new SparseArray<Parcelable>(); 
-
185:	((View) mMenuView).saveHierarchyState(viewStates); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: put
17:	mDtNames = new SparseArray<String>(); 
18:	mDtNames.put(1, "TV ?"); 
19:	mDtNames.put(2, "Cablebox ?"); 
20:	mDtNames.put(3, "Tuner / Hifi ?"); 
21:	mDtNames.put(4, "BD Player ?"); 
22:	mDtNames.put(5, "? ?"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: get
87:	return mKeyMapping.get(keyCode) != null; 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: delete, get, put
452:	mScrapHeap.put(position, v); 
-
457:	View result = mScrapHeap.get(position); 
-
460:	mScrapHeap.delete(position); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: delete, indexOfValue, keyAt, size
159:	int index = mAlarms.indexOfValue(alarm); 
-
161:	mAlarms.delete(mAlarms.keyAt(index)); 
-
165:	if (mAlarms.size() == 0) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: get
116:	intent = mShortcutIntents.get(shortcut); 
-
123:	intent = mShortcutIntents.get(shortcut); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: get, put
246:	ShortcutPreference pref = mShortcutToPreference.get(shortcut); 
-
258:	mShortcutToPreference.put(shortcut, pref); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: get
132:	apis.add(channels.get(id.FUNY)); 
133:	apis.add(channels.get(id.KICHIKU)); 
134:	apis.add(channels.get(id.PET)); 
135:	apis.add(channels.get(id.EAT)); 
136:	apis.add(channels.get(id.SCIENCE)); 
137:	apis.add(channels.get(id.SPORT)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: put
36:	uids = new SparseArray<E>(2); 
-
39:	uids.put(uid, value); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: delete, indexOfValue, keyAt, size
157:	int index = mAlarms.indexOfValue(alarm); 
-
159:	mAlarms.delete(mAlarms.keyAt(index)); 
-
163:	if (mAlarms.size() == 0) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: get, put
77:	Typeface tf = mTypefaces.get(value); 
-
87:	mTypefaces.put(value, tf); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
152:	final TMXProperties<TMXTileProperty> existingProperties = this.mTMXTileProperties.get(pLocalTileID); 
-
158:	this.mTMXTileProperties.put(pLocalTileID, newProperties); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
165:	final ITextureRegion cachedTextureRegion = globalTileIDToTextureRegionCache.get(pGlobalTileID); 
-
176:	globalTileIDToTextureRegionCache.put(pGlobalTileID, textureRegion); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
47:	= new SparseArray<HashMap<int[], Entry>>(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: put
27:	mErrorCode = new SparseArray<String>(); 
28:	mErrorCode.put(NET_WORK_ERROR, "联网发生异常"); 
29:	mErrorCode.put(NET_WORK_OR_PARSE_ERROR, "联网或解析异常"); 
30:	mErrorCode.put(FILE_ERROR_NOT_ENOUGH_SPACE, "SDCard没有足够的空间"); 
31:	mErrorCode.put(FILE_ERROR_NOT_FOUND_SDCARD,"没找到SDCard"); 
32:	mErrorCode.put(FILE_ERROR_COULD_NOT_BE_CREATED, "文件不能够被创建"); 
33:	mErrorCode.put(FILE_ERROR_NOT_FOUND_FILE, "没有找到文件"); 
34:	mErrorCode.put(UNKNOWN_ERROR, "未知错误"); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
133:	Typeface typeface = mTypefaces.get(typefaceValue); 
-
136:	mTypefaces.put(typefaceValue, typeface); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get
108:	return TYPE_CODES.get(code); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: delete, get
159:	IntentCallback callback = mOutstandingIntents.get(requestCode); 
160:	mOutstandingIntents.delete(requestCode); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
246:	ShortcutPreference pref = mShortcutToPreference.get(shortcut); 
-
258:	mShortcutToPreference.put(shortcut, pref); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
562:	String earconName = mEarconNames.get(earconId); 
-
569:	mEarconNames.put(earconId, earconName); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clear
39:	mRevDynamicIds.clear(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
145:	expectedSpinnterText.get(broadcastReceiverSpinnerId), 
-
147:	assertEquals("Wrong broadcast message in broadcast.", expectedSpinnterText.get(broadcastSpinnerId), 
-
149:	assertEquals("Wrong broadcast message in broadcastWait.", expectedSpinnterText.get(broadcastWaitSpinnerId), 
-
162:	expectedSpinnterText.put(spinnerId, text); 
-
171:	expectedSpinnterText.put(spinnerId, text); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get
116:	intent = mShortcutIntents.get(shortcut); 
-
123:	intent = mShortcutIntents.get(shortcut); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: clear, size
225:	for (int i = 0; i < notificationMap.size(); i++) { 
-
229:	notificationMap.clear(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
191:	Integer cachedSectionCount = mSectionCountCache.get(section); 
-
196:	mSectionCountCache.put(section, sectionCount); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: delete, get
457:	View result = mScrapHeap.get(position); 
-
460:	mScrapHeap.delete(position); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
21:	final static SparseArray<String> mDensities = new SparseArray<String>(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: get, put
197:	if (mActivePresentations.get(displayId) != null) { 
-
207:	mActivePresentations.put(displayId, presentation); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
562:	String earconName = mEarconNames.get(earconId); 
-
569:	mEarconNames.put(earconId, earconName); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
225:	View view = views.get(viewId); 
-
228:	views.put(viewId, view); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
46:	= new SparseArray<HashMap<int[], Entry>>(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: get, put
412:	UidCacheEntry cacheEntry = uidCache.get(uid); 
-
415:	uidCache.put(uid, cacheEntry); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
32:	mActivePointers = new SparseArray<PointF>(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
96:	new SparseArray<MessageListItemCoordinates>(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
63:	= new SparseArray<PowerManager.WakeLock>(); 
Full Snippet Info
6
CodeRank
Related Android SparseArray Questions & Answers:
See Code Examples for Android SparseArray Methods: