an android circle seekbar library
repositories {
// ...
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.feeeei:CircleSeekbar:v1.0.3'
}
<io.feeeei.circleseekbar.CircleSeekBar
android:id="@+id/seekbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:wheel_max_process="100"
/>
<!-- process -->
<attr name="wheel_max_process" format="integer" />
<attr name="wheel_cur_process" format="integer" />
<!-- reached style -->
<attr name="wheel_reached_color" format="color" />
<attr name="wheel_reached_width" format="dimension" />
<!-- unReached style -->
<attr name="wheel_unreached_color" format="color" />
<attr name="wheel_unreached_width" format="dimension" />
<!-- pointer style -->
<attr name="wheel_pointer_color" format="color" />
<attr name="wheel_pointer_radius" format="dimension" />
<!--shadows style -->
<attr name="wheel_has_pointer_shadow" format="boolean" />
<attr name="wheel_has_wheel_shadow" format="boolean" />
<attr name="wheel_pointer_shadow_radius" format="dimension" />
<attr name="wheel_shadow_radius" format="dimension" />
<!-- if you want to open the wheel shadow, open this can speed up the rendering speed -->
<attr name="wheel_has_cache" format="boolean" />
<!-- if you want to block touchListener,use like processBar,
only allow the code to control the schedule, you can change this attribute to false -->
<attr name="wheel_can_touch" format="boolean" />
Custom view scrollbar
自定义view实现下载进度的展示 控件完全自定义,字体大小,圆环宽度,实心或者空心,圆环的宽度,圆环的颜色,进度字体的粗细,字体颜色等等都可以自定义
CircleProgressBar继承ProgressBar, 是包含实心和线条两种风格的圆环进度条. 此外, 进度值可以随意定制. 如果你对酷炫的进度条比较感兴趣, 或许你更喜欢 LoadingDrawable.
dependencies {
compile 'com.dinuscxj:circleprogressbar:1.1.1'
}
<com.dinuscxj.progressbar.CircleProgressBar
android:id="@+id/line_progress"
android:layout_marginTop="@dimen/default_margin"
android:layout_width="50dp"
android:layout_height="50dp" />
有下面这些属性你可以设置:
The style:
The background color
The progress text:
The progress circle:
The progress_shader
The progress_stroke_cap
The line style:
例如 :
<com.dinuscxj.progressbar.CircleProgressBar
android:layout_width="50dp"
android:layout_height="50dp"
app:style="line"
app:background_color="@color/holo_red_light"
app:progress_text_color="@color/holo_purple"
app:progress_text_size="@dimen/progress_text_size"
app:draw_progress_text="true"
app:progress_text_format_pattern="@string/progress_text_format_pattern"
app:progress_stroke_width="1dp"
app:progress_start_color="@color/holo_purple"
app:progress_end_color="@color/holo_green_light"
app:progress_background_color="@color/holo_darker_gray"
app:progress_shader="sweep"
app:progress_stroke_cap="round"
app:line_width="4dp"
app:line_count="30"/>