# CircularProgressDrawable **Repository Path**: HarmonyOS-tpc/CircularProgressDrawable ## Basic Information - **Project Name**: CircularProgressDrawable - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-17 - **Last Updated**: 2023-04-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## CircularProgressDrawable ## Introduction A drawable with capabilities to indicate progress. ## Usage Instruction - Circular Progress Drawable can be defined programatically and the only parameters it will require will be the different colours and the size of the outer ring. - Scale Property for the inner ring can be used to achieve a variety of effects, as pulsating effects, overshoot or to make it disappear completely. - The drawable allows both for a progress and an indetermination mode. In the indetermination mode instead of filling the outer ring, a 90ยบ arc will be shown that can be animated to spin around the inner circle. ## Installation Instruction Method 1: Generate the .har package through the library and add the .har package to the libs folder. Add the following code to the entry gradle: ``` dependencies { implementation fileTree (dir: 'libs', include: ['*.jar', '*.har']) } ``` Method 2: For using as a library project, add the following code to the entry gradle: ``` dependencies { implementation project(path: ':circularprogressdrawable') } ``` Method 3. For using CircularProgressDrawable library from a remote repository in separate application, add the below dependency in entry/build.gradle file. ``` dependencies { implementation 'io.openharmony.tpc.thirdlib:CircularProgressDrawable:1.0.0' } ``` ## Why a drawable? If you want to achieve interesting effects and animations on openharmony, a surprisingly easy and fast way to achieve it is subclassing a Drawable instead of subclassing a Button or an ImageView. In order to implement advanced behavior over the Drawable, you can still implement your own animations by using openharmony animations framework or by the use of listeners on the views you are using. ## Composition The Circular Progress Drawable is made out of three differentiated components: * The first one is what is known as the *inner circle*. The radius of the drawable and can be scaled up and down to achieve a progress effect or to serve a background for a TextView on top to indicate its meaning. * The next is the *outline ring*. This ring will surround the inner circle and it is intended as a subtle cue of the empty state of the progress. * The last is the *outer ring*. It will be used for several purposes. The first is to show the progress of the drawable. In the current version, the progress ring is filled from the bottom and counter-clockwise. ## License Copyright 2014 Sefford. 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.