In the past 8 years of my career, I have been part of several Android projects, from dating apps to communication and utility apps, but whatever project I joined I always found at least one library to show images in a circular shape (CircleImageView) and in some projects I also found a second library to show images with just rounded corners (not full circle). These libraries ultimately resulted in a lot of bugs and crashes. On top of that most of these libraries were not written by well-reputed developers so no updates with bug fixes were there to update to. Replacing those in some cases cost thousands of dollars.

In this article, we will talk about 3 different ways to show images in a circular shape but first let’s talk about how to pick the right 3rd party library as picking the right library to use is very important.

Picking the Right Third-Party Library

Using a 3rd party library is not a crime and in fact, each Android project is filled with many 3rd party libraries but choosing which 3rd party library to use and which not is very important. So the following are some guidelines to help you decide which library to pick when looking for an open-source library for any platform, not just Android.

  • Pick a library that is well maintained. Go to Insights -> Contributors on GitHub and look at the contribution graph to see how often the codebase of the project is updated. For example, below is the contribution graph of our loved Retrofit Android library.

Image for post

Contributions graph of the Retrofit Android library

  • Pick a library that has multiple contributors. The more the contributors the less the chances of that library getting deprecated quickly. Go to _Insights -> Contributors _on GitHub page of that library to find out the contributors list.
  • Pick a library that is developed and maintained by a well-reputed company like Google, Square etc.

#kotlin #android-app-development #programming #android #mobile-app-development

Android: CircleImageView Simplified
1.60 GEEK