Skip to content

Instantly share code, notes, and snippets.

View isansc's full-sized avatar

Isan de Sousa Castro Campos isansc

View GitHub Profile
@zmeid
zmeid / CircularNetworkImageView
Last active July 17, 2018 08:29 — forked from bkurzius/CircularNetworkImageView
The original "CircularNetworkImageView.java" class is not well organized to use in recyclerview or listview. It calculates different sizes for each image. I have edited the "getCircularBitmap" method of original class, in order to get same-sized and same-positioned circular imageviews in recyclerview, listview.
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Bitmap.Config;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.BitmapDrawable;