I need to create a progressbar in arc shape. should I create a custom view for that? Or with the help of onDraw() method of ProgressBar class I can perform this thing? I also want to add marker on this progressBar like thermometer. Please suggest me any idea. Thanks.
Something like this:
protected synchronized void onDraw(Canvas canvas) {
int progress = this.getProgress();
int maxProgress = this.getMax();
//calc the progress to angles
float angleProgress = progress * 360 / maxProgress;
//create and set the arc paint
Paint arcPaint = new Paint();
arcPaint.setColor(0xff800000);
arcPaint.setAntiAlias(true);
arcPaint.setStyle(Style.FILL);
Rect arcRect = new Rect(); this.getDrawingRect(arcRect);
canvas.drawArc(new RectF(arcRect), -90, angleProgress,true, arcPaint);
}
For ref check this image arc shape progressbar

The default ProgressBar widget is not easily customisable, even for significantly less ambitious changes than this. In my opinion, it offers you no valuable behaviours in this context, other than acting as a carrier for minimum, maximum and current values. It also brings with it unwanted functionality such as the ‘indeterminate’ state.
Create a custom view by extending View and implementing onDraw() – as you have – and onMeasure().