Android 常見進度條---合集LProgressView
Android 常見進度條---LineProgressView <一>
Android 常見進度條---LineCentreProView <二>
Android 常見進度條---LineBottomProView <三>
Android 常見進度條---ArcProView <四>
Android 常見進度條---WaterWaveProView <五>
LineProgressView效果圖
一. 簡單使用
1. 導入項目
//項目根目錄下 build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' } //添加
}
}
dependencies {
implementation 'com.github.liys666666:LProgressView:V1.0.1' //添加
}
2.使用
<com.liys.view.LineProView
...
app:radius="20dp"
app:progress_radius="20dp"
app:progress_value="50"/>
所有屬性
<attr name="progress_max" format="integer"/> //總數
<attr name="progress_value" format="integer"/> //進度
<attr name="progress_size" format="dimension"/> //進度條 大小
<attr name="progress_color" format="color"/> //進度條 顏色
<attr name="progress_color_background" format="color"/> //進度條背景顏色
<attr name="text_size" format="dimension"/> //文字大小
<attr name="text_color" format="color"/> //文字顏色
<attr name="text_show" format="boolean"/> //是否顯示文字
<attr name="text_decimal_num" format="integer"/> //保留多少位小數
<attr name="light_color" format="color"/> //發光顏色
<attr name="light_show" format="boolean"/> //是否需要發光
<attr name="stroke_color" format="color"/> //邊框顏色
<attr name="stroke_width" format="dimension"/> //邊框大小
<attr name="stroke_show" format="boolean"/> //是否需要邊框