Code example for SparseArray

Methods: indexOfKeyput

0
		} 
	} 
 
	private void showPresentation(Display aDisplay, PresentationState aState) {
		final int displayId = aDisplay.getDisplayId();
		if (mActivePresentations.indexOfKey(displayId) < 0) {
			Log.d(TAG, "Showing presentation on display #" + displayId + ".");
			OpenGLDemoPresentation presentation = new OpenGLDemoPresentation(this, aDisplay, aState);
			presentation.show();
			presentation.setOnDismissListener(new OnDismissListener() {
				@Override 
				public void onDismiss(DialogInterface aDialog) {
					Log.v(TAG, "Presentation on display #" + displayId + " was dismissed.");
					// mActivePresentations.delete(displayId); 
				} 
			}); 
			mActivePresentations.put(displayId, presentation);
		} 
	} 
 
	private void hidePresentation(Display display) {
		final int displayId = display.getDisplayId();