Skip to content

Instantly share code, notes, and snippets.

Tung Dao Xuan tungdx

Block or report user

Report or block tungdx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tungdx /
Created Jul 21, 2016 — forked from gabrielemariotti/
How to obtain a CardView (support library) with a Image and rounded corners for API<21
ImageView imageView = (ImageView) findViewById(;
Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.rose);
} else {
RoundCornersDrawable round = new RoundCornersDrawable(mBitmap,
getResources().getDimension(R.dimen.cardview_default_radius), 0); //or your custom radius
You can’t perform that action at this time.