From c8c70f036fa24f37b05e07d29bb73014d3e2dd5c Mon Sep 17 00:00:00 2001 From: zhoulei <1090447721@qq.com> Date: Thu, 8 Jul 2021 10:06:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?findbugs=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../library/AdvancedPagerSlidingTabStrip.java | 22 +++++-------------- .../library/CustomPagerSlidingTabStrip.java | 11 +--------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java b/Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java index 222dd8a..00f1f44 100644 --- a/Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java +++ b/Library/src/main/java/com/lhh/apst/library/AdvancedPagerSlidingTabStrip.java @@ -229,15 +229,6 @@ public class AdvancedPagerSlidingTabStrip extends ScrollView implements Componen void onClick(int pos); } - /** - * 构造函数 - * - * @param context 上下文 - */ - public AdvancedPagerSlidingTabStrip(Context context) { - this(context, null); - } - /** * 构造函数 * @@ -245,7 +236,7 @@ public class AdvancedPagerSlidingTabStrip extends ScrollView implements Componen * @param attrSet AttrSet */ public AdvancedPagerSlidingTabStrip(Context context, AttrSet attrSet) { - this(context, attrSet, null); + this(context, attrSet,""); } /** @@ -806,10 +797,10 @@ public class AdvancedPagerSlidingTabStrip extends ScrollView implements Componen // 绘制提示下划线 float r = ((float) indicatorHeight) / 2; - canvas.drawCircle(lineLeft + currentTextViewLeft + r, height - indicatorHeight + r, r, rectPaint); - canvas.drawCircle(lineLeft + currentTextViewRight - r, height - indicatorHeight + r, r, rectPaint); + canvas.drawCircle((float) ((double) lineLeft + (double) currentTextViewLeft + (double) r), (float) (height - indicatorHeight + (double) r), r, rectPaint); + canvas.drawCircle((float) ((double) lineLeft + (double) currentTextViewRight - (double) r), (float) (height - indicatorHeight + (double) r), r, rectPaint); - canvas.drawRect(lineLeft + currentTextViewLeft + r, height - indicatorHeight, lineLeft + currentTextViewRight - r, height, rectPaint); + canvas.drawRect((float) ((double) lineLeft + (double) currentTextViewLeft + (double) r), height - indicatorHeight, (float) ((double) lineLeft + (double) currentTextViewRight - (double) r), height, rectPaint); // 分割线paint dividerPaint.setColor(new Color(dividerColor)); @@ -881,9 +872,8 @@ public class AdvancedPagerSlidingTabStrip extends ScrollView implements Componen } } else if (obj instanceof PixelMap) { PixelMap bitmap = (PixelMap) obj; - if (bitmap != null) { - drawable = new PixelMapElement(bitmap); - } + drawable = new PixelMapElement(bitmap); + } else if (obj instanceof Element) { drawable = (Element) obj; } diff --git a/Library/src/main/java/com/lhh/apst/library/CustomPagerSlidingTabStrip.java b/Library/src/main/java/com/lhh/apst/library/CustomPagerSlidingTabStrip.java index 531f749..43a1435 100644 --- a/Library/src/main/java/com/lhh/apst/library/CustomPagerSlidingTabStrip.java +++ b/Library/src/main/java/com/lhh/apst/library/CustomPagerSlidingTabStrip.java @@ -94,15 +94,6 @@ public class CustomPagerSlidingTabStrip extends ScrollView implements Component. Component getDisSelectTabView(int position, Component convertView); } - /** - * 构造函数 - * - * @param context 上下文 - */ - public CustomPagerSlidingTabStrip(Context context) { - this(context, null); - } - /** * 构造函数 * @@ -110,7 +101,7 @@ public class CustomPagerSlidingTabStrip extends ScrollView implements Component. * @param attrSet AttrSet */ public CustomPagerSlidingTabStrip(Context context, AttrSet attrSet) { - this(context, attrSet, null); + this(context, attrSet, ""); } /** -- Gitee From 6f0895881dd06bab1744da4cf941cd0f886a8772 Mon Sep 17 00:00:00 2001 From: zhoulei <1090447721@qq.com> Date: Thu, 8 Jul 2021 10:24:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?maven=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 ++++- README.md | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09b579b..6a6e1a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,5 @@ ## 0.0.1-SNAPSHOT -* ohos 第一个版本,完整实现了原库的全部api \ No newline at end of file +* ohos 第一个版本,完整实现了原库的全部api + +## 0.0.2-SNAPSHOT +* sdk升级,findbugs修改 \ No newline at end of file diff --git a/README.md b/README.md index abd3552..49ef882 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ allprojects { 2.在entry模块的build.gradle文件中, ``` dependencies { - implementation('com.gitee.chinasoft_ohos:AdvancedPagerSlidingTabStrip:0.0.1-SNAPSHOT') + implementation('com.gitee.chinasoft_ohos:AdvancedPagerSlidingTabStrip:0.0.2-SNAPSHOT') ...... } ``` @@ -222,7 +222,7 @@ CloudTest代码测试无异常 #### 版本迭代 -- 0.0.1-SNAPSHOT +- 0.0.2-SNAPSHOT #### 版权和许可信息 -- Gitee From fa08b0e840926652261a30fa3332e9edff8b5064 Mon Sep 17 00:00:00 2001 From: zhoulei <1090447721@qq.com> Date: Thu, 8 Jul 2021 10:34:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?maven=E7=89=88=E6=9C=AC=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a6e1a4..ef499d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -## 0.0.1-SNAPSHOT -* ohos 第一个版本,完整实现了原库的全部api - ## 0.0.2-SNAPSHOT -* sdk升级,findbugs修改 \ No newline at end of file +* sdk升级,findbugs修改 + +## 0.0.1-SNAPSHOT +* ohos 第一个版本,完整实现了原库的全部api \ No newline at end of file -- Gitee