@Override
    protected BitmapDrawable scaleImage(final Bitmap bitmap) {
        final TextView view = viewRef.get();
        if (bitmap == null || view == null) {
            return null;
        }
        final BitmapDrawable drawable = new BitmapDrawable(view.getResources(), bitmap);
        drawable.setBounds(ImageUtils.scaleImageToLineHeight(drawable, view));
        return drawable;
    }
Specialized image class for fetching and displaying smileys in the log book.
main/src/main/java/cgeo/geocaching/network/SmileyImage.java