I need to mark progress on the edge of my gaze. For instance. Initially, the view will have no border at all, when 50% progress is achieved, only 50% of the view will receive the border. Find the attached image. I have a lot of googling, but no luck. The view I used is a text image.

Edited
The following code shortens the edges of a bitmap. What I did in this code is 1. Bg is set to a black hexagon 2. And I took an empty green boundary hexagon and opened this hollow hexagon so that it looks like the border is accumulating.
public class MyView extends View { private Bitmap mBitmap; private Paint mPaint; private RectF mOval; private float mAngle = 135; private Paint mTextPaint; private Bitmap bgBitmap; public MyView(Context context) { super(context); doInit(); } public MyView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr);
}
source share