Skip to content

HorizontalProgressView

Version 0.2.0

Quick start

Version 0.2.0

<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" />

Default style

HorizontalProgressView

Drawable for background

Version 0.2.0

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" />

Image background

Drawable for progress

Version 0.2.0

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" />

Image progress

Stroke

Version 0.2.0

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
Image background Image background

HorizontalTextProgressView

Height of progress

Version 0.5.5

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
Height 15dp Height 25dp

Text margin

Version 0.5.5

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 margin

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" />

Text margin

LineTextProgressView

Height of progress

Version 0.5.5

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
Height 15dp Height 25dp

Text margin

Version 0.5.5

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 margin

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" />

Text margin

Sample code

Sample code