Here is another easiest way to get a custom shape for your image (Image View). It might be helpful for someone. This is just one line code.
First you need to add the dependency:
dependencies { compile 'com.mafstech.libs:mafs-image-shape:1.0.4' }
And then just write a line of code like this:
Shaper.shape(context, R.drawable.your_original_image_which_will_be_displayed, R.drawable.shaped_image_your_original_image_will_get_this_images_shape, imageView, height, weight);
Mafujul Jul 19 '17 at 15:25 2017-07-19 15:25
source share