From e2915fbf672f8e850399c2c46b506a18ef4a9cd9 Mon Sep 17 00:00:00 2001 From: liujing Date: Thu, 23 Sep 2021 21:00:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E5=90=8E=E4=B8=80=E5=88=97=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=88=92=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/check/view/CheckInfoGridItemDivider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoGridItemDivider.java b/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoGridItemDivider.java index 61cba5efdf..fbde44758d 100644 --- a/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoGridItemDivider.java +++ b/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoGridItemDivider.java @@ -98,7 +98,7 @@ public class CheckInfoGridItemDivider extends RecyclerView.ItemDecoration { private void drawVerticalForFirstColum(Canvas c, View child) { final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child - .getLayoutParams(); + .getLayoutParams();//在父布局的 int left = child.getLeft() - params.leftMargin - divider.getIntrinsicWidth(); int top = child.getTop() - params.topMargin; int right = child.getLeft() - params.leftMargin; @@ -111,9 +111,9 @@ public class CheckInfoGridItemDivider extends RecyclerView.ItemDecoration { private void drawVerticalForLastColum(Canvas c, View child) { final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child .getLayoutParams(); - int left = child.getLeft() + params.leftMargin - divider.getIntrinsicWidth(); + int left = child.getRight() - params.leftMargin - divider.getIntrinsicWidth(); int top = child.getTop() - params.topMargin; - int right = child.getLeft() + params.leftMargin; + int right = child.getRight() - params.leftMargin + divider.getIntrinsicWidth(); int bottom = top + child.getHeight() + divider.getIntrinsicHeight(); divider.setBounds(left, top, right, bottom); divider.draw(c); @@ -135,7 +135,7 @@ public class CheckInfoGridItemDivider extends RecyclerView.ItemDecoration { if (isFirstColum(parent, i, getSpanCount(parent))) { //画第一列左边分割线 drawVerticalForFirstColum(c, child); } - if (isLastColum(parent, i, getSpanCount(parent), childCount)) {//画最后一列分割线 + if (isLastColum(parent, i, getSpanCount(parent), childCount)) {//画最后一列右侧分割线 drawVerticalForLastColum(c, child); } }