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) {
Stop searching for code, let great code find you!  Add Codota to your java IDE