Code example for SparseArray

Methods: delete

0
        @Override 
        public void onDismiss(DialogInterface dialog) { 
            DemoPresentation presentation = (DemoPresentation)dialog; 
            int displayId = presentation.getDisplay().getDisplayId(); 
            Log.d(TAG, "Presentation on display #" + displayId + " was dismissed."); 
            mActivePresentations.delete(displayId); 
            mDisplayListAdapter.notifyDataSetChanged(); 
        } 
    }; 
 
    /** 
     * List adapter. 
     * Shows information about all displays. 
     */ 
    private final class DisplayListAdapter extends ArrayAdapter<Display> {
        final Context mContext;
 
        public DisplayListAdapter(Context context) {
            super(context, R.layout.presentation_list_item);
            mContext = context;
        }