Code example for LruCache

Methods: get, remove

0
        if (getBitmapFromMemCache(key) == null)
            mMemoryCashe.put(key, BitmapFactory.decodeFile(key));
    } 
 
    public Bitmap getBitmapFromMemCache(String key){
        return mMemoryCashe.get(key);
    } 
 
    public void clearBitmapToMemoryCache(String key){
        if (getBitmapFromMemCache(key) != null)
            mMemoryCashe.remove(key);
    } 
 
    @Override 
    public int getCount() { 
        return list.size();
    } 
 
    @Override 
    public Object getItem(int i) {
        Log.v(TAG, "Индекс getItem: "+i);