public static Bitmap createBitmapForText(final String text, final float textSizeInDp, @Nullable final Typeface typeface, @ColorInt final int textColor, @ColorInt final int fillColor) {
        final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
        paint.setTextSize(ViewUtils.dpToPixelFloat(textSizeInDp));
        paint.setColor(textColor);
        if (typeface != null) {
            paint.setTypeface(typeface);
        }

        paint.setTextAlign(Paint.Align.LEFT);
        final float baseline = -paint.ascent(); // ascent() is negative
        final int width = (int) (paint.measureText(text) + 0.5f); // round
        final int height = (int) (baseline + paint.descent() + 0.5f);
        final Bitmap image = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
        final Canvas canvas = new Canvas(image);
        if (fillColor != Color.TRANSPARENT) {
            canvas.drawColor(fillColor, PorterDuff.Mode.SRC_OVER);
        }
        canvas.drawText(text, 0, baseline, paint);
        return image;
    }
transforms an ImageView in a zoomable, pinchable ImageView. This method uses Loupe under the hood
@param activity activity where the view resides in
@param imageView imageView to make zoomable/pinchable
@param imageContainer container around the imageView. See loupe doc for details
@param onFlingUpDown optional: action to happen on fling down or fling up
@param onSingleTap optiona: action to happen on single tap. Note that this action is registered / exceuted for whole activity
main/src/main/java/cgeo/geocaching/utils/ImageUtils.java