Code example for SparseArray

Methods: deleteget

0
mScrapHeap.put(position, new WeakReference<View>(v));
        } 
 
        public View get(int position) {
            WeakReference<View> ref = mScrapHeap.get(position);
            mScrapHeap.delete(position);
            if(ref!=null) {
                if(ref.get() == null)
                return ref.get();
            } 
            return null; 
        } 
 
        public void clear() { 
            mScrapHeap.clear();
        } 
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java