Rounded ImageView with thin border #Android
Here is a little trick to create a rounded ImageView with a thin border.
We use this class :
I spent a lot of time to search on the web a class which allows to create a rotation effect on each item of an Android listview.
Here is a good implementation which works fine :
package com.frisbeeeapp.frisbeee.utilities;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.util.AttributeSet;
import android.widget.ImageView;
public class CircularImageView extends ImageView {
private int borderWidth = 2;
private int viewWidth;
private int viewHeight;
private Bitmap image;
private Paint paint;
...