CopyPastor

Detecting plagiarism made easy.

Score: 0.9539963967481236; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-12-20
by Rubin bhandari

Original Post

Original - Posted on 2014-10-20
by tyczj



            
Present in both answers; Present only in the new answer; Present only in the old answer;

In the v21 of the Support library there is now a solution to this: it's called [RoundedBitmapDrawable][1].
It's basically just like a normal Drawable except you give it a corner radius for the clipping with:
setCornerRadius(float cornerRadius)
So, starting with Bitmap src and a target ImageView, it would look something like this:
RoundedBitmapDrawable dr = RoundedBitmapDrawableFactory.create(res, src); dr.setCornerRadius(cornerRadius); imageView.setImageDrawable(dr);
[1]: https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable
In the v21 of the Support library there is now a solution to this: it's called [RoundedBitmapDrawable][1].
It's basically just like a normal Drawable except you give it a corner radius for the clipping with:
setCornerRadius(float cornerRadius)
So, starting with `Bitmap src` and a target `ImageView`, it would look something like this:
RoundedBitmapDrawable dr = RoundedBitmapDrawableFactory.create(res, src); dr.setCornerRadius(cornerRadius); imageView.setImageDrawable(dr);
[1]: http://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable.html

        
Present in both answers; Present only in the new answer; Present only in the old answer;