RoundedImageView

Introduction: A RoundedImageView that supports any corner rounding or circular shape support
More: Author   ReportBugs   
Tags:

Download Min API License

A RoundedImageView library that supports rounding any corner or circular shape. It supports all kinds of drawable, bitmaps, resources just like a normal ImageView. All scale types are working. RoundedImageView is extended from AppCompatImageView.

Limitations

  • Android Studio does not display rounded corner in Layout Preview
  • Borders are not supported at the moment. Pull requests are welcomed.
  • Shadows are not supported at the moment.
  • RTL support is not present.
  • Oval shape is not supported.

Gradle

implementation 'com.rishabhharit.roundedimageview:RoundedImageView:0.7.1'

How to use

 <com.rishabhharit.roundedimageview.RoundedImageView
    ...
    app:cornerRadius="8dp"
    app:roundedCorners="topRight|bottomLeft"
    ...
 />

Circular Shape

To get Circular shape, all you need to do is set cornerRadius to a value that is higher than the width & height of your RoundedImageView app:cornerRadius="1000dp"

Customizations

app:roundedCorners is pretty flexible. It supports all the following variations

app:roundedCorners="all|top|bottom|right|topLeft|topRight|bottomLeft|bottomRight" (yes you can use multiple at the same time here separated by | )

Default is value for app:roundedCorners is all

Default is value for app:cornerRadius is 0dp

Medium LinkedIn

Support Me
Apps
About Me
Google+: Trinea trinea
GitHub: Trinea