Sunday, June 08, 2014

RoundedImageView in Android


The contact picture as it appears in Google+ inside a circle was part of the redesigned Random Contact app at the play store.

The solution was to create a custom View "RoundedImageView". Developed with help from stackoverlow.com, the custom view is released as an open source component that anyone can reuse.

RoundedImageView usd in Random Contact app
The RoundedImageView extends android.widget.ImageView and basically applies a circular mask over the image by overriding the onDraw() method.

This file is a part of the ae-apps-library project.

Source for RoundedImageView at https://github.com/midhunhk/ae-apps-library/blob/master/library/AeAppsLibrary/src/com/ae/apps/common/views/RoundedImageView.java

No comments: