Skip to content

ArcProgressView

Add: Version 0.2.0

Quick start

Add: Version 0.2.0

<com.ave.vastgui.tools.view.progress.ArcProgressView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

Default style

Progress width

Add: Version 0.2.0   Update: Version 1.5.2

Width of pogress can be set by arc_progress_width or calling progressWidth .

binding.arcProgressView.progressWidth = 10f.DP
<com.ave.vastgui.tools.view.progress.ArcProgressView
    ... 
    app:arc_progress_width="10dp" />
20dp 10dp
Width 20dp Width 10dp

Color of startpoint and endpoint circle

Add: Version 0.5.4   Update: Version 1.5.2

Color of startpoint circle can be set by arc_progress_startpoint_circle_color or calling startpointCircleColor .

Color of endpoint circle can be set by arc_progress_endpoint_circle_color or calling endpointCircleColor .

binding.arcProgressView.startpointCircleColor =
    ColorUtils.colorHex2Int("#e84118")

binding.arcProgressView.endpointCircleColor = 
    ColorUtils.colorHex2Int("#e84118")
<com.ave.vastgui.tools.view.progress.ArcProgressView
    ... 
    app:arc_progress_startpoint_circle_color="#e84118"
    app:arc_progress_endpoint_circle_color="#e84118" />
Progress 0 Progress 55 Startpoint circle Endpoint circle
Progress 0 Progress 55 Startpoint circle Endpoint circle

Radius of endpoint circle

Add: Version 0.5.5   Update: Version 1.5.2

Radius of endpoint circle can be set by arc_progress_endpoint_circle_radius or calling endpointCircleRadius .

binding.arcProgressView.endpointCircleRadius = 
    15f.DP.coerceAtLeast(recommendedRadius())
<com.ave.vastgui.tools.view.progress.ArcProgressView
    ... 
    app:arc_progress_endpoint_circle_radius="20dp" />

Progress endpoint radius

Shader

Add: Version 0.5.5   Update: Version 1.5.2

Shader of progress can be set by calling progressShader .

val colors = intArrayOf(
    ... // Color-int
)
val pos = floatArrayOf(
    ... // The relative positions [0..1] of each corresponding color in the colors array.
)
binding.arcProgressView.progressShader = LinearGradient(
    -700f, 0f, 700f, 0f,
    colors, pos,
    Shader.TileMode.CLAMP
)

Progress shader

Sample code

Sample code