# CProgressButton **Repository Path**: HarmonyOS-tpc/CProgressButton ## Basic Information - **Project Name**: CProgressButton - **Description**: a circle progress button like iOS - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2021-04-15 - **Last Updated**: 2025-09-10 ## Categories & Tags **Categories**: harmonyos-progress, harmonyos-button **Tags**: None ## README # CProgressButton a circle progress button like iOS
![image](image/me.gif) ## Usage: ### Gradle 添加har包到libs文件夹内 在entry的gradle内添加如下代码: ```groovy dependencies { implementation "io.openharmony.tpc.thirdlib:CProgressButton:1.0.1" } ``` ### code ``` //config in your app CProgressButton.initStatusString(new String[]{"download","pause","complete","error","delete"}); //use CProgressButton progressButton = (CProgressButton) findComponentById(ResourceTable.Id_btn); if(progressButton.getState() != CProgressButton.STATE.NORMAL){ progressButton.normal(0/1/2/3); //max value is String[].length - 1; call anytime; }else{ progressButton.startDownload(); //you must call startDownload() before download(progress); progressButton.download(progress); } ``` ### xml layout ``` the radius in bounder.xml app:stroke_width="1vp"/> //stroke outside width -> the width in bounder.xml ``` graphic-> bounder.xml ``` ``` ### License Copyright 2016 NewTab Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.