¡@

Home 

2014/10/16 ¤W¤È 08:12:42

android Programming Glossary: drawablemap

Out of memory exception due to large bitmap size

http://stackoverflow.com/questions/5321579/out-of-memory-exception-due-to-large-bitmap-size

from server @SuppressWarnings unchecked public class DrawableManager @SuppressWarnings rawtypes private final Map drawableMap @SuppressWarnings rawtypes private DrawableManager drawableMap new HashMap static private DrawableManager _instance static.. @SuppressWarnings rawtypes private final Map drawableMap @SuppressWarnings rawtypes private DrawableManager drawableMap new HashMap static private DrawableManager _instance static public DrawableManager getInstance if _instance null _instance.. return _instance public Bitmap fetchBitmap final String sURL if sURL.length 0 return null Bitmap bm Bitmap drawableMap.get sURL if bm null return bm byte imageData ThumbImg sURL if imageData null return null if imageData.length 0 bm BitmapFactory.decodeByteArray..

How do I do a lazy load of images in ListView

http://stackoverflow.com/questions/541966/how-do-i-do-a-lazy-load-of-images-in-listview

under the License. import java.io.IOException public class DrawableManager private final Map String Drawable drawableMap public DrawableManager drawableMap new HashMap String Drawable public Drawable fetchDrawable String urlString if drawableMap.containsKey.. java.io.IOException public class DrawableManager private final Map String Drawable drawableMap public DrawableManager drawableMap new HashMap String Drawable public Drawable fetchDrawable String urlString if drawableMap.containsKey urlString return.. public DrawableManager drawableMap new HashMap String Drawable public Drawable fetchDrawable String urlString if drawableMap.containsKey urlString return drawableMap.get urlString Log.d this.getClass .getSimpleName image url urlString try InputStream..