From a03b28dab16652a76da4027991ccbdb7ed924b79 Mon Sep 17 00:00:00 2001 From: liujing Date: Sun, 26 Sep 2021 10:13:13 +0800 Subject: [PATCH] =?UTF-8?q?[add]=20=E6=A3=80=E6=B5=8B=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=95=8C=E9=9D=A2=E5=8F=96=E5=80=BCindex?= =?UTF-8?q?=E4=BF=AE=E6=94=B9,=20UI=E4=BC=98=E5=8C=96(=E8=BE=B9=E6=A1=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0,=E5=8D=95=E5=85=83=E6=A0=BC=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E5=AE=BD=E5=BA=A6,=E8=89=B2=E5=80=BC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/function/check/view/CheckInfoAdapter.java | 6 +++--- .../core/function/check/view/CheckInfoListDialog.java | 3 ++- .../src/main/res/drawable/check_recycler_shape.xml | 11 +++++++++++ .../src/main/res/layout/activity_check.xml | 2 +- .../src/main/res/layout/check_info_list.xml | 3 ++- .../src/main/res/layout/check_list.xml | 2 +- .../src/main/res/values/colors.xml | 3 +++ 7 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 core/function-impl/mogo-core-function-check/src/main/res/drawable/check_recycler_shape.xml diff --git a/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoAdapter.java b/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoAdapter.java index 6a2a907497..b2e2f90ce2 100644 --- a/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoAdapter.java +++ b/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoAdapter.java @@ -56,8 +56,8 @@ public class CheckInfoAdapter extends RecyclerView.Adapter { ((CheckInfoViewHolder) holder).mTextView.setText("运行状态"); } else { try { - if ((position - 4) < showData.size()) { - int index = position - 4; + if ((position - 4) < showData.size() * 2) { + int index = (position - 4) / 2; CheckResultData.CheckListItem positionItem = showData.get(index); if (isEven(position) == true) {//偶数隐藏图片显示检测指标 ((CheckInfoViewHolder) holder).checkIcon.setVisibility(View.GONE); @@ -94,7 +94,7 @@ public class CheckInfoAdapter extends RecyclerView.Adapter { @Override public int getItemCount() { - return showData.size() + 4; + return showData.size() * 2 + 4; } public class CheckInfoViewHolder extends RecyclerView.ViewHolder { diff --git a/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoListDialog.java b/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoListDialog.java index 892faa1f91..c4a119bad9 100644 --- a/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoListDialog.java +++ b/core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckInfoListDialog.java @@ -61,7 +61,8 @@ public class CheckInfoListDialog extends BaseFloatDialog { layoutManager.setOrientation(GridLayoutManager.VERTICAL); //网格绘制 try { - CheckInfoGridItemDivider gridLayoutDivider = new CheckInfoGridItemDivider(3, Color.parseColor("#767FCD")); + CheckInfoGridItemDivider gridLayoutDivider = new CheckInfoGridItemDivider(1, + (mContext.getResources().getColor(R.color.check_info_position_line_color))); mRecyclerView.addItemDecoration(gridLayoutDivider); } catch (Exception e) { e.printStackTrace(); diff --git a/core/function-impl/mogo-core-function-check/src/main/res/drawable/check_recycler_shape.xml b/core/function-impl/mogo-core-function-check/src/main/res/drawable/check_recycler_shape.xml new file mode 100644 index 0000000000..b46d99a0b8 --- /dev/null +++ b/core/function-impl/mogo-core-function-check/src/main/res/drawable/check_recycler_shape.xml @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-check/src/main/res/layout/activity_check.xml b/core/function-impl/mogo-core-function-check/src/main/res/layout/activity_check.xml index 66ddb09fd9..b9ae3f9dcd 100644 --- a/core/function-impl/mogo-core-function-check/src/main/res/layout/activity_check.xml +++ b/core/function-impl/mogo-core-function-check/src/main/res/layout/activity_check.xml @@ -14,7 +14,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent"/> #7AFF87 #242B59 #EE3132 + #666DA5 + #767FCD + \ No newline at end of file