Commit 15fcbc93a3286f2362fbd4393647f1b01c0049c4

Authored by 杨帅
1 parent b2caea24

1 修改重新上传列表只有一条数据时,点击删除按钮,当前列表为空时,视图显示状态

config.gradle
@@ -21,7 +21,7 @@ ext { @@ -21,7 +21,7 @@ ext {
21 //编译方式 21 //编译方式
22 debug : false, 22 debug : false,
23 //版本号 23 //版本号
24 - version: "0.6.13", 24 + version: "0.6.14",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.module", 26 packeg : "com.cnlive.module",
27 //Lib库名称 27 //Lib库名称
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/LineUpAgainView.java
@@ -74,6 +74,14 @@ public class LineUpAgainView implements MvpView { @@ -74,6 +74,14 @@ public class LineUpAgainView implements MvpView {
74 //先删除数据库,再更新列表 74 //先删除数据库,再更新列表
75 againAdapter.updateDeleteList(position); 75 againAdapter.updateDeleteList(position);
76 } 76 }
  77 + if (null != againAdapter) {
  78 + if (againAdapter.getListSize() < 1) {
  79 + if (null == fragment.getActivity()) {
  80 + return;
  81 + }
  82 + fragment.binding.llNoFailTip.setVisibility(View.VISIBLE);
  83 + }
  84 + }
77 } 85 }
78 }); 86 });
79 selectDialog.setCancelable(false); 87 selectDialog.setCancelable(false);
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/LineUpAgainAdapter.java
@@ -31,6 +31,14 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter. @@ -31,6 +31,14 @@ public class LineUpAgainAdapter extends RecyclerView.Adapter&lt;LineUpAgainAdapter.
31 private OnRestartUploadClickListener onRestartUploadClickListener; 31 private OnRestartUploadClickListener onRestartUploadClickListener;
32 private OnDeleteClickListener onDeleteClickListener; 32 private OnDeleteClickListener onDeleteClickListener;
33 33
  34 + public int getListSize() {
  35 + if (null == list) {
  36 + return 0;
  37 + } else {
  38 + return list.size();
  39 + }
  40 + }
  41 +
34 public void updateDeleteList(int position) { 42 public void updateDeleteList(int position) {
35 if (null != list) { 43 if (null != list) {
36 list.remove(position); 44 list.remove(position);