HorizontalProgressView¶
添加: Version 0.2.0
快速使用¶
添加: Version 0.2.0
在示例图中,从上到下依次是 HorizontalProgressView , HorizontalTextProgressView 和 LineTextProgressView 。
<com.ave.vastgui.tools.view.progress.HorizontalProgressView
android:layout_width="match_parent"
android:layout_height="50dp" />
<com.ave.vastgui.tools.view.progress.HorizontalTextProgressView
android:layout_width="match_parent"
android:layout_height="50dp" />
<com.ave.vastgui.tools.view.progress.LineTextProgressView
android:layout_width="match_parent"
android:layout_height="50dp" />
HorizontalProgressView¶
自定义图片背景¶
添加: Version 0.2.0 更新: Version 0.5.4
通过 horizontal_progress_background_drawable 和调用 setProgressBkDrawable 可以将图片设置为进度条背景。
binding.horizontalProgressView.setProgressBkDrawable(R.drawable.background)
<com.ave.vastgui.tools.view.progress.HorizontalProgressView
...
app:horizontal_progress_background_drawable="@drawable/background" />
自定义图片进度条¶
添加: Version 0.2.0 更新: Version 0.5.4
通过 horizontal_progress_drawable 和调用 setProgressDrawable 可以将图片设置为进度条。
binding.horizontalProgressView.setProgressDrawable(R.drawable.progress)
<com.ave.vastgui.tools.view.progress.HorizontalProgressView
...
app:horizontal_progress_drawable="@drawable/progress" />
描边宽度¶
添加: Version 0.2.0 更新: Version 1.5.2
通过 horizontal_progress_stroke_width 和调用 mStrokeWidth 来设置进度条和边框的距离。
binding.horizontalProgressView.strokeWidth = 0f
<com.ave.vastgui.tools.view.progress.HorizontalProgressView
...
app:horizontal_progress_stroke_width="0dp" />
| Width 0dp | Width 5dp |
|---|---|
![]() |
![]() |
HorizontalTextProgressView¶
进度条高度设置¶
添加: Version 0.5.5 更新: Version 1.5.2
进度条高度可以通过 horizontal_text_progress_height 和 progressHeight 来进行设置。
binding.horizontalTextProgressView.progressHeight = 15f.DP
<com.ave.vastgui.tools.view.progress.HorizontalTextProgressView
...
app:horizontal_text_progress_height="15dp" />
| Height 15dp | Height 25dp |
|---|---|
![]() |
![]() |
字体外边距¶
添加: Version 0.5.5 更新: Version 1.5.2
字体外边距可以通过 horizontal_text_progress_text_margin 和 textMargin 进行设置。
binding.horizontalTextProgressView.textMargin = 10f.DP
<com.ave.vastgui.tools.view.progress.HorizontalTextProgressView
...
app:horizontal_text_progress_text_margin="10dp" />
文字框颜色设置¶
添加: Version 0.5.5 更新: Version 1.5.2
文字框颜色可以通过 horizontal_text_progress_box_color 和 textBoxColor 来进行设置。
binding.horizontalTextProgressView.textBoxColor = ColorUtils.colorHex2Int("#e84118")
<com.ave.vastgui.tools.view.progress.HorizontalTextProgressView
...
app:horizontal_text_progress_box_color="#e84118" />
LineTextProgressView¶
进度条高度设置¶
添加: Version 0.5.5 更新: Version 1.5.2
进度条高度可以通过 linetext_progress_height 和 progressHeight 来进行设置。
binding.lineTextProgressView.progressHeight = 15f.DP
<com.ave.vastgui.tools.view.progress.LineTextProgressView
...
app:linetext_progress_height="15dp" />
| Height 15dp | Height 25dp |
|---|---|
![]() |
![]() |
字体外边距¶
添加: Version 0.5.5 更新: Version 1.5.2
字体外边距可以通过 linetext_progress_text_margin 和 textMargin 进行设置。
binding.lineTextProgressView.textMargin = 10f.DP
<com.ave.vastgui.tools.view.progress.LineTextProgressView
...
app:linetext_progress_text_margin="10dp" />
文字框颜色设置¶
添加: Version 0.5.5 更新: Version 1.5.2
文字框颜色可以通过 linetext_progress_box_color 和 textBoxColor 来进行设置。
binding.horizontalTextProgressView.textBoxColor = ColorUtils.colorHex2Int("#e84118")
<com.ave.vastgui.tools.view.progress.LineTextProgressView
...
app:linetext_progress_box_color="#e84118" />











