|
@@ -2,8 +2,13 @@ package com.sjkj.appthreefloor_tsgz.activity;
|
|
|
|
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.graphics.drawable.Drawable;
|
|
|
|
+import android.os.Build;
|
|
|
|
+import android.text.TextUtils;
|
|
|
|
+import android.util.Log;
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
|
|
|
|
|
+import androidx.annotation.RequiresApi;
|
|
|
|
+import androidx.core.content.ContextCompat;
|
|
import androidx.lifecycle.ViewModelProvider;
|
|
import androidx.lifecycle.ViewModelProvider;
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
@@ -12,6 +17,7 @@ import com.google.android.flexbox.AlignItems;
|
|
import com.google.android.flexbox.FlexDirection;
|
|
import com.google.android.flexbox.FlexDirection;
|
|
import com.google.android.flexbox.FlexWrap;
|
|
import com.google.android.flexbox.FlexWrap;
|
|
import com.google.android.flexbox.FlexboxLayoutManager;
|
|
import com.google.android.flexbox.FlexboxLayoutManager;
|
|
|
|
+import com.gyf.immersionbar.ImmersionBar;
|
|
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
|
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
|
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
|
|
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
|
|
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
|
|
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
|
|
@@ -19,9 +25,13 @@ import com.sjkj.appthreefloor_tsgz.R;
|
|
import com.sjkj.appthreefloor_tsgz.adapter.CameraAdapter;
|
|
import com.sjkj.appthreefloor_tsgz.adapter.CameraAdapter;
|
|
import com.sjkj.appthreefloor_tsgz.adapter.RightAdapter;
|
|
import com.sjkj.appthreefloor_tsgz.adapter.RightAdapter;
|
|
import com.sjkj.appthreefloor_tsgz.app.App;
|
|
import com.sjkj.appthreefloor_tsgz.app.App;
|
|
|
|
+import com.sjkj.appthreefloor_tsgz.bean.AllCameraBean;
|
|
|
|
+import com.sjkj.appthreefloor_tsgz.bean.CameraTypeBean;
|
|
import com.sjkj.appthreefloor_tsgz.bean.RightModelBean;
|
|
import com.sjkj.appthreefloor_tsgz.bean.RightModelBean;
|
|
import com.sjkj.appthreefloor_tsgz.databinding.ActivityCameraListBinding;
|
|
import com.sjkj.appthreefloor_tsgz.databinding.ActivityCameraListBinding;
|
|
import com.sjkj.appthreefloor_tsgz.net.CameraAllListRequest;
|
|
import com.sjkj.appthreefloor_tsgz.net.CameraAllListRequest;
|
|
|
|
+import com.sjkj.appthreefloor_tsgz.net.CameraTypeListRequest;
|
|
|
|
+import com.sjkj.appthreefloor_tsgz.net.GetDictTypeRequest;
|
|
import com.sjkj.base_lib.adapter.BaseRecAdapter;
|
|
import com.sjkj.base_lib.adapter.BaseRecAdapter;
|
|
import com.sjkj.base_lib.camera.dh.bean.CameraBean;
|
|
import com.sjkj.base_lib.camera.dh.bean.CameraBean;
|
|
import com.sjkj.base_lib.camera.dh.view.DHCameraDetailsActivity;
|
|
import com.sjkj.base_lib.camera.dh.view.DHCameraDetailsActivity;
|
|
@@ -30,9 +40,11 @@ import com.sjkj.base_lib.divider.DividerItem;
|
|
import com.sjkj.base_lib.entity.Params;
|
|
import com.sjkj.base_lib.entity.Params;
|
|
import com.sjkj.base_lib.net.domain.interactor.ProcessErrorSubscriber;
|
|
import com.sjkj.base_lib.net.domain.interactor.ProcessErrorSubscriber;
|
|
import com.sjkj.base_lib.utils.AppTools;
|
|
import com.sjkj.base_lib.utils.AppTools;
|
|
|
|
+import com.sjkj.base_lib.utils.ToastUtils;
|
|
import com.sjkj.base_lib.view.BaseActivity;
|
|
import com.sjkj.base_lib.view.BaseActivity;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -46,12 +58,16 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
// private TypeAdapter typeAdapter;
|
|
// private TypeAdapter typeAdapter;
|
|
private List<RightModelBean> typeList = new ArrayList<>();
|
|
private List<RightModelBean> typeList = new ArrayList<>();
|
|
// private List<RegionModel> regionList = new ArrayList<>();
|
|
// private List<RegionModel> regionList = new ArrayList<>();
|
|
- private List<CameraBean> list = new ArrayList<>();
|
|
|
|
|
|
+ private List<AllCameraBean.Rows> list = new ArrayList<>();
|
|
private int currentPage = 1;
|
|
private int currentPage = 1;
|
|
private ActivityCameraListBinding binding;
|
|
private ActivityCameraListBinding binding;
|
|
private CameraViewModel viewModel;
|
|
private CameraViewModel viewModel;
|
|
private CameraAllListRequest cameraListRequest = new CameraAllListRequest(App.getInstance());
|
|
private CameraAllListRequest cameraListRequest = new CameraAllListRequest(App.getInstance());
|
|
|
|
+ private CameraTypeListRequest cameraTypeListRequest = new CameraTypeListRequest(App.getInstance());
|
|
|
|
+ public GetDictTypeRequest getDictTypeRequest = new GetDictTypeRequest(App.getInstance());
|
|
private String titleName;
|
|
private String titleName;
|
|
|
|
+ private List<CameraTypeBean> cameraTypeList = new ArrayList<>();
|
|
|
|
+ private List<CameraTypeBean> cameraTypeList2 = new ArrayList<>();
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public int initLayout() {
|
|
public int initLayout() {
|
|
@@ -68,6 +84,23 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void initView() {
|
|
public void initView() {
|
|
|
|
+
|
|
|
|
+// ViewGroup.LayoutParams params = binding.toolbar.getLayoutParams();
|
|
|
|
+// params.height = ImmersionBar.getStatusBarHeight(this);
|
|
|
|
+// binding.toolbar.setLayoutParams(params);
|
|
|
|
+ ImmersionBar.with(MonitoringCenterActivity.this)
|
|
|
|
+ .statusBarDarkFont(true, 0.2f)
|
|
|
|
+ .statusBarColor(R.color.white)
|
|
|
|
+ .titleBar(binding.toolbar)
|
|
|
|
+ .init();
|
|
|
|
+ getTitleView().setTextColor(getResources().getColor(R.color.black));
|
|
|
|
+ int drawableLeft = R.drawable.icon_back; // 替换为你的drawable资源ID
|
|
|
|
+ Drawable drawable1 = ContextCompat.getDrawable(MonitoringCenterActivity.this, drawableLeft);
|
|
|
|
+ if (drawable1 != null) {
|
|
|
|
+ getBackView().setCompoundDrawablesRelativeWithIntrinsicBounds(drawable1, null, null, null); // 使用Relative版本以支持RTL布局方向
|
|
|
|
+ }
|
|
|
|
+ getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.color.white));
|
|
|
|
+
|
|
Drawable drawable = getDrawable(R.drawable.icon_camera);
|
|
Drawable drawable = getDrawable(R.drawable.icon_camera);
|
|
drawable.setBounds(0, 30, 60, 90);
|
|
drawable.setBounds(0, 30, 60, 90);
|
|
getRightView().setCompoundDrawables(null, drawable, null, null);
|
|
getRightView().setCompoundDrawables(null, drawable, null, null);
|
|
@@ -81,7 +114,7 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- getRightView().setVisibility(View.VISIBLE);
|
|
|
|
|
|
+ getRightView().setVisibility(View.GONE);
|
|
titleName = getIntent().getStringExtra("titleName");
|
|
titleName = getIntent().getStringExtra("titleName");
|
|
//DrawerAdapter adapter1 = new DrawerAdapter(items);
|
|
//DrawerAdapter adapter1 = new DrawerAdapter(items);
|
|
|
|
|
|
@@ -107,22 +140,8 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
// if (TextUtils.isEmpty(titleName)) {
|
|
// if (TextUtils.isEmpty(titleName)) {
|
|
// getTitleView().setText(getString(R.string.monitor_center));
|
|
// getTitleView().setText(getString(R.string.monitor_center));
|
|
// } else {
|
|
// } else {
|
|
- getTitleView().setText(titleName);
|
|
|
|
|
|
+ getTitleView().setText("设备列表");
|
|
// }
|
|
// }
|
|
-// Drawable drawable = getDrawable(R.drawable.event_search_img);
|
|
|
|
-// drawable.setBounds(0, 30, 60, 90);
|
|
|
|
-// getRightView().setCompoundDrawables(null, drawable, null, null);
|
|
|
|
-// getRightView().setOnClickListener(new View.OnClickListener() {
|
|
|
|
-// @Override
|
|
|
|
-// public void onClick(View view) {
|
|
|
|
-// if (binding.drawerLayout.isDrawerVisible(binding.rightLayout)) {
|
|
|
|
-// binding.drawerLayout.closeDrawers();
|
|
|
|
-// } else {
|
|
|
|
-// binding.drawerLayout.openDrawer(binding.rightLayout);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// });
|
|
|
|
-// getRightView().setVisibility(View.GONE);
|
|
|
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
|
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
|
|
linearLayoutManager.setOrientation(RecyclerView.VERTICAL);
|
|
linearLayoutManager.setOrientation(RecyclerView.VERTICAL);
|
|
binding.mainRecyclerView.setLayoutManager(linearLayoutManager);
|
|
binding.mainRecyclerView.setLayoutManager(linearLayoutManager);
|
|
@@ -169,20 +188,21 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
// typeAdapter.setListener(item -> {
|
|
// typeAdapter.setListener(item -> {
|
|
//// typeModel = item;
|
|
//// typeModel = item;
|
|
// });
|
|
// });
|
|
- adapter.setItemClick(new BaseRecAdapter.OnItemClick<CameraBean>() {
|
|
|
|
|
|
+ adapter.setItemClick(new BaseRecAdapter.OnItemClick<AllCameraBean.Rows>() {
|
|
@Override
|
|
@Override
|
|
- public void onItemClick(CameraBean bean, int position) {
|
|
|
|
- if (AppTools.getCameraType() == AppTools.CAMERA_TYPE_NONE) {
|
|
|
|
-
|
|
|
|
- } else if (AppTools.getCameraType() == AppTools.CAMERA_TYPE_DH) {
|
|
|
|
- Intent intent = new Intent(MonitoringCenterActivity.this, DHCameraDetailsActivity.class);
|
|
|
|
- intent.putExtra("cameraId", bean.getId());
|
|
|
|
- startActivity(intent);
|
|
|
|
- } else if (AppTools.getCameraType() == AppTools.CAMERA_TYPE_HK) {
|
|
|
|
-// Intent intent = new Intent(MonitoringCenterActivity.this, HKH5CameraActivity.class);
|
|
|
|
|
|
+ public void onItemClick(AllCameraBean.Rows bean, int position) {
|
|
|
|
+ startActivity(new Intent(MonitoringCenterActivity.this, ExoPlayerActivity.class));
|
|
|
|
+// if (AppTools.getCameraType() == AppTools.CAMERA_TYPE_NONE) {
|
|
|
|
+//
|
|
|
|
+// } else if (AppTools.getCameraType() == AppTools.CAMERA_TYPE_DH) {
|
|
|
|
+// Intent intent = new Intent(MonitoringCenterActivity.this, DHCameraDetailsActivity.class);
|
|
// intent.putExtra("cameraId", bean.getId());
|
|
// intent.putExtra("cameraId", bean.getId());
|
|
// startActivity(intent);
|
|
// startActivity(intent);
|
|
- }
|
|
|
|
|
|
+// } else if (AppTools.getCameraType() == AppTools.CAMERA_TYPE_HK) {
|
|
|
|
+//// Intent intent = new Intent(MonitoringCenterActivity.this, HKH5CameraActivity.class);
|
|
|
|
+//// intent.putExtra("cameraId", bean.getId());
|
|
|
|
+//// startActivity(intent);
|
|
|
|
+// }
|
|
// intent.putExtra("deviceName", bean.getCameraId());
|
|
// intent.putExtra("deviceName", bean.getCameraId());
|
|
// intent.putExtra("deviceIp", bean.getCameraId());
|
|
// intent.putExtra("deviceIp", bean.getCameraId());
|
|
// intent.putExtra("deviceUserName", bean.getCameraId());
|
|
// intent.putExtra("deviceUserName", bean.getCameraId());
|
|
@@ -194,6 +214,45 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void loadData() {
|
|
public void loadData() {
|
|
|
|
+
|
|
|
|
+ Params params = new Params();
|
|
|
|
+ params.put("dictType", "camera_type");
|
|
|
|
+ getDictTypeRequest.setParams(params);
|
|
|
|
+ getDictTypeRequest.execute(new ProcessErrorSubscriber<List<CameraTypeBean>>() {
|
|
|
|
+ @Override
|
|
|
|
+ public void onError(Throwable e) {
|
|
|
|
+ super.onError(e);
|
|
|
|
+ if (!TextUtils.isEmpty(e.getMessage())) {
|
|
|
|
+ ToastUtils.show(e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void onNext(List<CameraTypeBean> list) {
|
|
|
|
+ super.onNext(list);
|
|
|
|
+ cameraTypeList.clear();
|
|
|
|
+ cameraTypeList.addAll(list);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ Params params1 = new Params();
|
|
|
|
+ params1.put("dictType", "camera_actuality");
|
|
|
|
+ getDictTypeRequest.setParams(params1);
|
|
|
|
+ getDictTypeRequest.execute(new ProcessErrorSubscriber<List<CameraTypeBean>>() {
|
|
|
|
+ @Override
|
|
|
|
+ public void onError(Throwable e) {
|
|
|
|
+ super.onError(e);
|
|
|
|
+ if (!TextUtils.isEmpty(e.getMessage())) {
|
|
|
|
+ ToastUtils.show(e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void onNext(List<CameraTypeBean> list) {
|
|
|
|
+ super.onNext(list);
|
|
|
|
+ cameraTypeList2.clear();
|
|
|
|
+ cameraTypeList2.addAll(list);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
requestListRefresh();
|
|
requestListRefresh();
|
|
// LocationUtils.getInstance().startLocation(true, new LocationUtils.OnLocationListener() {
|
|
// LocationUtils.getInstance().startLocation(true, new LocationUtils.OnLocationListener() {
|
|
// @Override
|
|
// @Override
|
|
@@ -204,7 +263,23 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
// cameraList();
|
|
// cameraList();
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
-
|
|
|
|
|
|
+// showLoadingDialog();
|
|
|
|
+// cameraTypeListRequest.execute(new ProcessErrorSubscriber() {
|
|
|
|
+// @Override
|
|
|
|
+// public void onError(Throwable e) {
|
|
|
|
+// super.onError(e);
|
|
|
|
+// hideLoadingDialog(LoadingDialog.LOADING_FAILED);
|
|
|
|
+// if (!TextUtils.isEmpty(e.getMessage())) {
|
|
|
|
+// ToastUtils.show(e.getMessage());
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// @Override
|
|
|
|
+// public void onNext(Object o) {
|
|
|
|
+// super.onNext(o);
|
|
|
|
+// hideLoadingDialog(LoadingDialog.LOADING_SUCCESS);
|
|
|
|
+// }
|
|
|
|
+// });
|
|
typeList.add(new RightModelBean("camera_type_2", "森林防火", false));
|
|
typeList.add(new RightModelBean("camera_type_2", "森林防火", false));
|
|
typeList.add(new RightModelBean("camera_type_4", "病虫害", false));
|
|
typeList.add(new RightModelBean("camera_type_4", "病虫害", false));
|
|
typeList.add(new RightModelBean("camera_type_1", "秸秆禁烧", false));
|
|
typeList.add(new RightModelBean("camera_type_1", "秸秆禁烧", false));
|
|
@@ -216,32 +291,55 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
}
|
|
}
|
|
|
|
|
|
private void requestListRefresh() {
|
|
private void requestListRefresh() {
|
|
|
|
+
|
|
|
|
+
|
|
currentPage = 1;
|
|
currentPage = 1;
|
|
Params params = new Params();
|
|
Params params = new Params();
|
|
params.put("cameraName", viewModel.keyword.get());
|
|
params.put("cameraName", viewModel.keyword.get());
|
|
params.put("pageNum", currentPage);
|
|
params.put("pageNum", currentPage);
|
|
- params.put("deptId", AppTools.getDeptId());
|
|
|
|
- if (titleName.equals("数字公安")) {
|
|
|
|
- params.put("type", "11");
|
|
|
|
- } else {
|
|
|
|
- params.put("type", "1,2,3,4,5,6,7,8,9,10,11,12");
|
|
|
|
- }
|
|
|
|
- params.put("pageSize", 20);
|
|
|
|
|
|
+
|
|
|
|
+ params.put("pageSize", 10);
|
|
cameraListRequest.setParams(params);
|
|
cameraListRequest.setParams(params);
|
|
- cameraListRequest.execute(new ProcessErrorSubscriber<List<CameraBean>>() {
|
|
|
|
|
|
+ cameraListRequest.execute(new ProcessErrorSubscriber<AllCameraBean>() {
|
|
@Override
|
|
@Override
|
|
public void onError(Throwable e) {
|
|
public void onError(Throwable e) {
|
|
super.onError(e);
|
|
super.onError(e);
|
|
finishRefreshOrLoadMore(binding.smartRefreshLayout);
|
|
finishRefreshOrLoadMore(binding.smartRefreshLayout);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @RequiresApi(api = Build.VERSION_CODES.N)
|
|
@Override
|
|
@Override
|
|
- public void onNext(List<CameraBean> beanList) {
|
|
|
|
|
|
+ public void onNext(AllCameraBean beanList) {
|
|
super.onNext(beanList);
|
|
super.onNext(beanList);
|
|
list.clear();
|
|
list.clear();
|
|
- if (beanList != null && beanList.size() > 0) {
|
|
|
|
- list.addAll(beanList);
|
|
|
|
|
|
+ if (beanList != null && beanList.getRows().size() > 0) {
|
|
|
|
+
|
|
|
|
+ list.addAll(beanList.getRows());
|
|
|
|
+ for (Iterator<AllCameraBean.Rows> iterator = list.iterator(); iterator.hasNext(); ) {
|
|
|
|
+ AllCameraBean.Rows bean = iterator.next();
|
|
|
|
+ for (int i = 0; i < cameraTypeList.size(); i++) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (bean.getCameraType().equals(cameraTypeList.get(i).getDictValue())) { // 例如,我们想修改名为"Banana"的元素的value属性
|
|
|
|
+ bean.setCameraType(cameraTypeList.get(i).getDictLabel()); // 修改value属性
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (Iterator<AllCameraBean.Rows> iterator = list.iterator(); iterator.hasNext(); ) {
|
|
|
|
+ AllCameraBean.Rows bean = iterator.next();
|
|
|
|
+ for (int i = 0; i < cameraTypeList2.size(); i++) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (bean.getCameraActuality().equals(cameraTypeList2.get(i).getDictValue())) { // 例如,我们想修改名为"Banana"的元素的value属性
|
|
|
|
+ bean.setCameraActuality(cameraTypeList2.get(i).getDictLabel()); // 修改value属性
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
adapter.refreshList(list);
|
|
adapter.refreshList(list);
|
|
finishRefreshOrLoadMore(binding.smartRefreshLayout);
|
|
finishRefreshOrLoadMore(binding.smartRefreshLayout);
|
|
}
|
|
}
|
|
@@ -251,16 +349,11 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
private void requestListLoadMore() {
|
|
private void requestListLoadMore() {
|
|
Params params = new Params();
|
|
Params params = new Params();
|
|
params.put("cameraName", viewModel.keyword.get());
|
|
params.put("cameraName", viewModel.keyword.get());
|
|
- params.put("pageSize", 20);
|
|
|
|
- params.put("deptId", AppTools.getDeptId());
|
|
|
|
- if (titleName.equals("数字公安")) {
|
|
|
|
- params.put("type", "11");
|
|
|
|
- } else {
|
|
|
|
- params.put("type", "1,2,3,4,5,6,7,8,9,10,11,12");
|
|
|
|
- }
|
|
|
|
|
|
+ params.put("pageSize", 10);
|
|
|
|
+
|
|
params.put("pageNum", currentPage + 1);
|
|
params.put("pageNum", currentPage + 1);
|
|
cameraListRequest.setParams(params);
|
|
cameraListRequest.setParams(params);
|
|
- cameraListRequest.execute(new ProcessErrorSubscriber<List<CameraBean>>() {
|
|
|
|
|
|
+ cameraListRequest.execute(new ProcessErrorSubscriber<AllCameraBean>() {
|
|
@Override
|
|
@Override
|
|
public void onError(Throwable e) {
|
|
public void onError(Throwable e) {
|
|
super.onError(e);
|
|
super.onError(e);
|
|
@@ -268,11 +361,31 @@ public class MonitoringCenterActivity extends BaseActivity {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void onNext(List<CameraBean> beanList) {
|
|
|
|
|
|
+ public void onNext(AllCameraBean beanList) {
|
|
super.onNext(beanList);
|
|
super.onNext(beanList);
|
|
- if (beanList != null && beanList.size() > 0) {
|
|
|
|
|
|
+ if (beanList != null && beanList.getRows().size() > 0) {
|
|
currentPage = currentPage + 1;
|
|
currentPage = currentPage + 1;
|
|
- list.addAll(beanList);
|
|
|
|
|
|
+ list.addAll(beanList.getRows());
|
|
|
|
+ for (Iterator<AllCameraBean.Rows> iterator = list.iterator(); iterator.hasNext(); ) {
|
|
|
|
+ AllCameraBean.Rows bean = iterator.next();
|
|
|
|
+ for (int i = 0; i < cameraTypeList.size(); i++) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (bean.getCameraType().equals(cameraTypeList.get(i).getDictValue())) { // 例如,我们想修改名为"Banana"的元素的value属性
|
|
|
|
+ bean.setCameraType(cameraTypeList.get(i).getDictLabel()); // 修改value属性
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (Iterator<AllCameraBean.Rows> iterator = list.iterator(); iterator.hasNext(); ) {
|
|
|
|
+ AllCameraBean.Rows bean = iterator.next();
|
|
|
|
+ for (int i = 0; i < cameraTypeList2.size(); i++) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (bean.getCameraActuality().equals(cameraTypeList2.get(i).getDictValue())) { // 例如,我们想修改名为"Banana"的元素的value属性
|
|
|
|
+ bean.setCameraActuality(cameraTypeList2.get(i).getDictLabel()); // 修改value属性
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
adapter.refreshList(list);
|
|
adapter.refreshList(list);
|
|
}
|
|
}
|
|
finishRefreshOrLoadMore(binding.smartRefreshLayout);
|
|
finishRefreshOrLoadMore(binding.smartRefreshLayout);
|