ImageView rounded corners

后端 未结 17 1994
长发绾君心
长发绾君心 2020-11-27 15:33

I wanted image to have rounded corners. I implement this xml code and use this in my image view. but image overlap the shape. I am downloading the image through async task.<

17条回答
  •  迷失自我
    2020-11-27 16:20

    NEW ANSWER Use Glide library for this. This lib is also recommended by Google. See How to round an image with Glide library?

    OLD ANSWER Just add that image in a cardView and set cardView's elevation on 0dp...will do the trick (in my case was a viewPager with images - just replace the viewPager with an ImageView):

    
    
        
    
    
    

提交回复
热议问题