Code example for SparseArray

Methods: deleteget

0
    /** 
     * Hides a {@link Presentation} on the specified display. 
     */ 
    private void hidePresentation(Display display) {
        final int displayId = display.getDisplayId();
        DemoPresentation presentation = mActivePresentations.get(displayId);
        if (presentation == null) {
            return; 
        } 
 
        Log.d(TAG, "Dismissing presentation on display #" + displayId + ".");
 
        presentation.dismiss();
        mActivePresentations.delete(displayId);
    } 
 
    private int getNextPhoto() { 
        final int photo = mNextImageNumber;
        mNextImageNumber = (mNextImageNumber + 1) % PHOTOS.length;
        return photo;