How to create a ‘transparent circle inside rectangle’ shape in XML in Android?
I’ve been playing recently with something similar, and adapted it for you. All the magic is happening in the onDraw : public class FocusView extends View { private Paint mTransparentPaint; private Paint mSemiBlackPaint; private Path mPath = new Path(); public FocusView(Context context) { super(context); initPaints(); } public FocusView(Context context, AttributeSet attrs) { super(context, attrs); initPaints(); … Read more