diff --git a/CHANGELOG.md b/CHANGELOG.md index 09b579b8951cba93a2396dda01747cbfd3187ab1..ef499d726e6367035fbf2f61988fbd24b7b9c52e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,5 @@ +## 0.0.2-SNAPSHOT +* sdk升级,findbugs修改 + ## 0.0.1-SNAPSHOT * ohos 第一个版本,完整实现了原库的全部api \ No newline at end of file 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 222dd8a0f37e75a33e92e4a79148e543e02db98f..00f1f44524d0d78a3f9cec5986c5bafd6a366751 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 531f749d32a420171d1d231b6d73976d4e728892..43a1435bab94e32021059cc582defe0d775025cc 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, ""); } /** diff --git a/README.md b/README.md index abd3552da1563cc6fa0216fec4d30ac25bdcc006..49ef88204518272e8ed1aca8ba3cacc9cbc32a9a 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 #### 版权和许可信息