Back to project page scala1_android.
The source code is released under:
Copyright (c) 2012, Magnetic Bear Studios Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditio...
If you think the Android project scala1_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.koushikdutta.urlimageviewhelper; /*from ww w.j av a 2 s.com*/ import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; public class UrlLruCache extends LruCache<String, BitmapDrawable> { public UrlLruCache(int maxSize) { super(maxSize); } @Override protected int sizeOf(String key, BitmapDrawable value) { if (value != null) { Bitmap b = value.getBitmap(); if (b != null) return b.getRowBytes() * b.getHeight(); } return 0; } }