Skip to content

Instantly share code, notes, and snippets.

@canujohann
Created October 3, 2014 06:27
Show Gist options
  • Save canujohann/38ed32246dd96735fcea to your computer and use it in GitHub Desktop.
Save canujohann/38ed32246dd96735fcea to your computer and use it in GitHub Desktop.
add-border-to-bitmap
Paint mShadow = new Paint();
// radius=10, y-offset=2, color=black
mShadow.setShadowLayer(10.0f, 0.0f, 2.0f, 0xFF000000);
// in onDraw(Canvas)
canvas.drawBitmap(bitmap, 0.0f, 0.0f, mShadow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment