/ Progress

Simple customized progress bar in the form of an arch

Simple customized progress bar in the form of an arch


Simple customized progress bar in the form of an arch.


enter image description here

Quick start

Step 1


compile 'io.github.dvegasa:arcpointer:1.0.1'



Step 2




        ArcPointer arcPointer = findViewById(R.id.arcpointer);

android:layout_width and android:layout_height should be set "wrap_content". To specify the size of View, use the radius.



XML attributes and Java methods

radius (dp)
int getRadius()
void setRadius(int radius)

The radius of arc

value (float)
float getValue()
void setValue(float value)

The pointer positon. Value is a float between 0 and 1 (see image above for more understanding)

     0f = left border
   0.5f = mid of arc
     1f = right border

workAngle (int) [degrees]
int getWorkAngle()
void setWorkAngle(int workAngle)

The value of the angle of the arch in degrees

notches (Only Java)
float[] getNotches()
void setNotches(int n)
void setNotches (float[] notches)

The position of notches on the arch.

  • If you use (int n) overload, the n notches will be located evenly
  • If you use (float[] notches) overload, the notches will be located on the coordinates you specify

setNotches(new float[]{0.1f, 0.2f, 0.5f});


isAnimated (boolean)
boolean isAnimated()
void setAnimated(boolean animated)

If true, then the value change occurs with animation.

animationVelocity (int in XML)
long getAnimationVelocity()
void setAnimationVelocity(long animationVelocity)

Animation speed. The smaller, the faster. Default value is 1500L

{!} Calling setAnimationVelocity doesn't cause the redraw of View

lineLengthRatio (float)
float getLineLengthRatio()
void setLineLengthRatio(float lineLengthRatio)

Indicates the length of the line relative to the radius of the arc.

lineLength = radius * lineLengthRatio

lineStrokeWidth (float)
float getLineStrokeWidth()
void setLineStrokeWidth(float lineStrokeWidth)

Line width. Default value is 2f

markerLengthRatio (float)
float getMarkerLengthRatio()
void setMarkerLengthRatio(float markerLengthRatio)

Indicates the length of the marker relative to the length of line

markerStrokeWidth (float)
float getMarkerStrokeWidth()
void setMarkerStrokeWidth(float markerStrokeWidth)

Marker width. Default value is 3f

notchesLengthRatio (float)
float getNotchLengthRatio()
void setNotchLengthRatio(float notchLengthRatio);

Indicates the length of the notch relative to the radius of arc

notchStrokeWidth (float)
float getNotchStrokeWidth()
void setNotchStrokeWidth(float notchStrokeWidth)

Notch width. Default value is 1.5f

colorBackground (int)
int getColorBackground()
void setColorBackground(int colorBackground)

Color of the background

colorLine (int)
int getColorLine()
void setColorLine(int colorLine)

Color of the line

colorMarker (int)
int getColorMarker()
void setColorMarker(int colorMarker)

Color of the marker

colorNotches (int)
int getColorNotches()
void setColorNotches(int colorNotches)

Color of the notches