diff --git a/README.md b/README.md
index e45c18457b959679bfda9d70a0f761f6a25e9487..eaedcb9060a02b1cf5b7d2b801ff36bee007720e 100644
--- a/README.md
+++ b/README.md
@@ -37,72 +37,29 @@ dependencies {
并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下
## 使用说明
-1.自定义类,继承Text,实现Imag接口,根据需要,设置Percent属性
-
-```java
- @Override
- public void setPercent(float percent) {
- float pc = percentIn01(percent);
- anim(0, pc, (long) (pc * maxTime));
- }
-
- @Override
- public void setPercent(float percent, long durationMillis) {
- float pc = percentIn01(percent);
- anim(0, pc, durationMillis);
- }
-
- @Override
- public void setSmoothPercent(float percent) {
- float pc = percentIn01(percent);
- anim(magPercent, pc, (long) ((pc - magPercent) * maxTime));
- }
-
- @Override
- public void setSmoothPercent(float percent, long durationMillis) {
- float pc = percentIn01(percent);
- anim(magPercent, pc, durationMillis);
- }
-
- private void anim(float lastPercent, float percent, long duration) {
- if (magValueAnimator != null) {
- if (magValueAnimator.isRunning()) {
- magValueAnimator.end();
- }
- magValueAnimator.release();
- }
- magValueAnimator = MagValueAnimator.ofFloat(lastPercent, percent);
- magValueAnimator.setDuration(duration);
- magValueAnimator.setValueUpdateListener(new AnimatorValue.ValueUpdateListener() {
- @Override
- public void onUpdate(AnimatorValue animatorValue, float value) {
- MagicProgressBar.this.percentValue = value;
- invalidate();
- }
- });
- magValueAnimator.start();
- this.magPercent = percent;
- }
-
+1.选择需要的自定义view,直接引用
+
+```xml
+
+ * Copyright (c) 2021 Huawei Device Co., Ltd. + * * 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 - *
+ * + * 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. */ + package com.liulishuo.magicprogresswidget; /**