| | |
| | | private RecyclerView mRecyclerView;
|
| | | private List<DeviceDetailListData.ResponseData.DeviceListBean> datas = new ArrayList<>();
|
| | | private DeviceListAdapter deviceListAdapter;
|
| | | // private LinearLayout llAdd;
|
| | | private LinearLayout llAdd;
|
| | | private LinearLayout llBack;
|
| | | private RelativeLayout rlNoDevice;
|
| | | //乐橙分页index
|
| | |
| | | }
|
| | |
|
| | | private void initView() {
|
| | | // llAdd = findViewById(R.id.ll_add);
|
| | | llAdd = findViewById(R.id.ll_add);
|
| | | llBack = findViewById(R.id.ll_back);
|
| | | rlNoDevice = findViewById(R.id.rl_no_device);
|
| | | deviceList = findViewById(R.id.device_list);
|
| | | deviceList.setOnRefreshListener(this);
|
| | | // llAdd.setOnClickListener(this);
|
| | | llAdd.setOnClickListener(this);
|
| | | llBack.setOnClickListener(this);
|
| | | refreshState(false);
|
| | | mRecyclerView = deviceList.getRefreshableView();
|
| | |
| | | int id = v.getId();
|
| | | if (id == R.id.ll_back) {
|
| | | finish();
|
| | | // } else if (id == R.id.ll_add) {
|
| | | // try {
|
| | | // LCDeviceEngine.newInstance().addDevice(this);
|
| | | // } catch (Exception e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | } else if (id == R.id.ll_add) {
|
| | | try {
|
| | | LCDeviceEngine.newInstance().addDevice(this);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|