Code example for SparseArray

Methods: putsize

0
        public void put(int position, View v) {
            mScrapHeap.put(position, v);
        } 
 
        public void add(View v) {
            mScrapHeap.put(mScrapHeap.size(), v);
        } 
        public View get() {
            if (mScrapHeap.size() < 1) return null;
 
            View result = mScrapHeap.valueAt(0);
            int key = mScrapHeap.keyAt(0);
 
            if (result != null) {
                mScrapHeap.delete(key);
            } 
            return result;
        } 
 
        View get(int position) {
Contextual code suggestions in your IDE  Get Codota for Java