I want to achieve below meter by use of canvas .
As you can see the black portion has 2 colors in it . I am able to set color of the black moving image using shape drawable. Code and image that I have achieved so far is given below. How can I have desired result. I am novice in canvas .
float[] outerR = new float[] { 7, 7,curve , curve, curve, curve, 7, 7};
ShapeDrawable mMovingRectangle = new ShapeDrawable();
mMovingRectangle.setShape(new RoundRectShape(outerR, null, null));
mMovingRectangle.getPaint().setColor(getResources().getColor(R.color.black_alfa_60));