代码拉取完成,页面将自动刷新
This CircularProgressView is a (surprisingly) circular progress bar openharmony View that is designed to imitate the Material versions of ProgressBar. These versions can be seen on this page of the Material design spec under Circular indicators.
progress view starts & never stops, keeps rotating
add the view to your layout:
<com.github.rahatarmanahmed.cpv.CircularProgressView
ohos:id="$+id:progress_view"
ohos:height="50vp"
ohos:width="50vp"
ohos:layout_alignment="horizontal_center"
ohos:padding="0vp"
ohos:top_margin="50vp"
app:cpv_animAutostart="false"
app:cpv_indeterminate="true"
app:cpv_thickness="8"/>
progress view starts & stops after full circle add the view to your layout:
<com.github.rahatarmanahmed.cpv.CircularProgressView
ohos:id="$+id:progress_view"
ohos:height="50vp"
ohos:width="50vp"
ohos:layout_alignment="horizontal_center"
ohos:padding="0vp"
ohos:top_margin="50vp"
app:cpv_animAutostart="false"
app:cpv_indeterminate="true"
app:cpv_thickness="8"/>
<Text
ohos:id="$+id:progress_view_label"
ohos:height="match_content"
ohos:width="match_content"
ohos:layout_alignment="horizontal_center"
ohos:text="CircularProgressView"
ohos:text_size="20fp"/>
<Button
ohos:id="$+id:button"
ohos:height="match_content"
ohos:width="match_content"
ohos:layout_alignment="horizontal_center"
ohos:padding="5vp"
ohos:text="Switch to Determinate"
ohos:text_size="20fp"/>
Method 1: Generate har package from library and add it to lib folder.
add following code to gradle of entry
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
Method 2:
allprojects{
repositories{
mavenCentral()
}
}
implementation 'io.openharmony.tpc.thirdlib:CircularProgressView:1.0.1'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。