# ProgressView **Repository Path**: HarmonyOS-tpc/ProgressView ## Basic Information - **Project Name**: ProgressView - **Description**: ProgressView是一个进度视图,目前实现了带数字进度的水平进度条以及圆形进度条,圆形进度条包括三种风格:普通环形进度,内部垂直填充进度以及内部环形填充进度 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-04-15 - **Last Updated**: 2023-04-17 ## Categories & Tags **Categories**: harmonyos-progress **Tags**: None ## README 该三方开源库从github fork过来,主要将底层接口调用的实现修改成鸿蒙接口的实现,将三方库鸿蒙化,供开发鸿蒙应用的开发者使用 fork地址:https://github.com/WhiteDG/ProgressView fork版本号/日期:master / 2017/7/10 # ProgressView ProgressView是一个进度视图,目前实现了带数字进度的水平进度条以及圆形进度条,圆形进度条包括三种风格:普通环形进度,内部垂直填充进度以及内部环形填充进度。 原项目Readme地址:https://github.com/WhiteDG/ProgressView/blob/master/README.md 项目移植状态:支持组件所有基本功能 完成度:100% 调用差异:无 # ProgressView A Circle View containing Title and Subtitle ## Usage add the dependency to your module's `build.gradle` file: ``` compile project(path: ':progressview') ``` or ``` allprojects{ repositories{ mavenCentral() } } implementation 'io.openharmony.tpc.thirdlib:ProgressView:1.0.1' ``` 1. In the XML add the progressview in your layout.xml and set the attrset ```xml ``` 2. In the AbilitySlice you can also set all of the attributes in activity ``` horizontalProgressView.setXXXX(); // for example: horizontalProgressView.setTextVisible(false); horizontalProgressView.setReachBarSize(4); horizontalProgressView.setProgressPosition(HorizontalProgressView.TOP); ... ``` and set progress with anim in time ``` HorizontalProgressView horizontalProgressView = (HorizontalProgressView) findComponentById(ResourceTable.Id_progress100); // set progress 100 with anim in 2500ms horizontalProgressView.setProgressInTime(100,2500); // set progress from 20 to 100 with anim in 2500ms horizontalProgressView.setProgressInTime(0,100,2500); // reset current progress with anim in 2500ms horizontalProgressView.runProgressAnim(2500); CircleProgressView circleProgressView = (CircleProgressView) findViefindComponentByIdwById(ResourceTable.Id_circle_progress_normal); ... // same as HorizontalProgressView circleProgressView.setProgressInTime(100,2500); ``` ## AttrSet #### HorizontalProgressView Name | Description :---:|:---: progressNormalColor | set the normal bar color progressReachColor | set the reach bar color progressTextColor | set the progress text color progressTextSize | set the progress text size progressTextOffset | set the progress text offset progressNormalSize | set the normal bar size progressReachSize | set the reach bar size progressTextPosition | set the progress text position(CENTER/BOTTOM/TOP) progressTextVisible | is show the progress text progressTextSkewX | set the progress text skewx progressTextPrefix | set the progress text prefix progressTextSuffix | set the progress text suffix(default '%') #### CircleProgressView Name | Description :---:|:---: progressNormalColor | set the normal bar color progressReachColor | set the reach bar color progressTextColor | set the progress text color progressTextSize | set the progress text size progressTextOffset | set the progress text offset progressNormalSize | set the normal bar size progressReachSize | set the reach bar size radius | set the circle radius progressTextVisible | is show the progress text progressTextSkewX |set the progress text skewx progressTextPrefix | set the progress text prefix progressTextSuffix | set the progress text suffix(default '%') progressStartArc | set the startArc of reach area progressStyle | set the style of CircleProgressView(Normal/FillInner/FillInnerArc) reachCapRound | set the reach bar cap round or not(only for style Normal) innerBackgroundColor | set the inner background color(only for style Normal) innerProgressColor | set the inner progress color(only for style FillInner) innerPadding | set the padding between the inner and outer circles(only for style FillInnerArc) outerColor | set the outer circle color(only for style FillInnerArc) outerSize | set outer circle width(only for style FillInnerArc)