HorizontalProgressView¶
Quick start¶
<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¶
Drawable for background¶
Background can be set by horizontal_progress_background_drawable
or calling setProgressBkDrawable
.
mBinding.horizontalProgressView
.setProgressBkDrawable(R.drawable.background)
<com.ave.vastgui.tools.view.progress.HorizontalProgressView
...
app:horizontal_progress_background_drawable="@drawable/background" />
Drawable for progress¶
Progress can be set to the drawable by horizontal_progress_drawable
or calling setProgressDrawable
.
mBinding.horizontalProgressView
.setProgressDrawable(R.drawable.progress)
<com.ave.vastgui.tools.view.progress.HorizontalProgressView
...
app:horizontal_progress_drawable="@drawable/progress" />
Stroke¶
Stroke of the progress can be set by horizontal_progress_stroke_width
or calling mStrokeWidth
.
mBinding.horizontalProgressView
.mStrokeWidth = 0f
<com.ave.vastgui.tools.view.progress.HorizontalProgressView
...
app:horizontal_progress_stroke_width="0dp" />
Width 0dp | Width 5dp |
---|---|
HorizontalTextProgressView¶
Height of progress¶
The height of progress can be set by horizontal_text_progress_height
or calling setProgressHeight
.
Minimum height of progress
The minimum height of progress will not smaller than the text height.
mBinding.horizontalTextProgressView.mProgressHeight = 15f.DP
<com.ave.vastgui.tools.view.progress.HorizontalTextProgressView
...
app:horizontal_text_progress_height="15dp" />
Height 15dp | Height 25dp |
---|---|
Text margin¶
Text margin can be set by horizontal_text_progress_text_margin
or calling mTextMargin
.
mBinding.horizontalTextProgressView.mTextMargin = 10f.DP
<com.ave.vastgui.tools.view.progress.HorizontalTextProgressView
...
app:horizontal_text_progress_text_margin="10dp" />
Text box color¶
Color-int of the text box can be set by horizontal_text_progress_box_color
or calling mTextBoxColor
.
mBinding.horizontalTextProgressView.mTextBoxColor =
ColorUtils.colorHex2Int("#e84118")
<com.ave.vastgui.tools.view.progress.HorizontalTextProgressView
...
app:horizontal_text_progress_box_color="#e84118" />
LineTextProgressView¶
Height of progress¶
The height of progress can be set by linetext_progress_height
or calling mProgressHeight
.
mBinding.lineTextProgressView.mProgressHeight = 15f.DP
<com.ave.vastgui.tools.view.progress.LineTextProgressView
...
app:linetext_progress_height="15dp" />
Height 15dp | Height 25dp |
---|---|
Text margin¶
Text margin can be set by linetext_progress_text_margin
or calling mTextMargin
.
mBinding.lineTextProgressView.mTextMargin = 10f.DP
<com.ave.vastgui.tools.view.progress.LineTextProgressView
...
app:linetext_progress_text_margin="10dp" />
Text box color¶
Color-int of the text box can be set by linetext_progress_box_color
or calling mTextBoxColor
.
mBinding.horizontalTextProgressView.mTextBoxColor =
ColorUtils.colorHex2Int("#e84118")
<com.ave.vastgui.tools.view.progress.LineTextProgressView
...
app:linetext_progress_box_color="#e84118" />