| | |
| | | viewBinding.messageSearchCl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | String messageStateType; |
| | | if (isAlarmDeviceClick) { |
| | | messageStateType = MessageStateType.untreated; |
| | | } else { |
| | | messageStateType = MessageStateType.processed; |
| | | } |
| | | Intent intent = new Intent(); |
| | | intent.putExtra("MessageStateType", messageStateType); |
| | | intent.setClass(_mActivity, SearchMessageActivity.class); |
| | | startActivity(intent); |
| | | } |
| | |
| | | mMessageAdapter.setOnclickListener(new MessageAdapter.OnClickListener() { |
| | | @Override |
| | | public void onClick(int position, MessageBean messageBean) { |
| | | String messageStateType; |
| | | if (isAlarmDeviceClick) { |
| | | messageStateType = MessageStateType.untreated; |
| | | } else { |
| | | messageStateType = MessageStateType.processed; |
| | | } |
| | | Intent intent = new Intent(); |
| | | intent.putExtra("msgId", messageBean.getMsgId().toString()); |
| | | intent.putExtra("messageStateType", messageStateType); |
| | | intent.setClass(_mActivity, MessageInfoActivity.class); |
| | | startActivity(intent); |
| | | } |
| | |
| | | @Override |
| | | public void onClick(int position, String title) { |
| | | textView.setText(title); |
| | | mTimeTypeFilterKye = filterType; |
| | | mTimeTypeFilterValue = findFilterValueString(title); |
| | | switch (filterType) { |
| | | case FilterType.deviceType: { |
| | | mDeviceTypeFilterKye = filterType; |
| | | mDeviceTypeFilterValue = findFilterValueString(title); |
| | | } |
| | | break; |
| | | case FilterType.type: { |
| | | mTypeFilterKye = filterType; |
| | | mTypeFilterValue = findFilterValueString(title); |
| | | } |
| | | break; |
| | | case FilterType.timeType: { |
| | | mTimeTypeFilterKye = filterType; |
| | | mTimeTypeFilterValue = findFilterValueString(title); |
| | | } |
| | | break; |
| | | } |
| | | loadNextPageMessageList(true, 1, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue, true); |
| | | } |
| | | }); |
| | |
| | | // 取消粘性事件 |
| | | EventBus.getDefault().removeStickyEvent(eventBus); |
| | | //进来读取一次数据(为了更新currentPage,currentTotal这个值) |
| | | initData(); |
| | | // initData(); |
| | | HdlLogLogic.print("正在点击【消息】"); |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | TextView textView = _mActivity.findViewById(R.id.my_message_bottom_il2).findViewById(R.id.red_count_tv); |
| | | if (textView != null) { |
| | | textView.setVisibility(View.GONE); |
| | | } |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | TextView textView = _mActivity.findViewById(R.id.my_message_bottom_il2).findViewById(R.id.red_count_tv); |
| | | if (textView != null) { |
| | | textView.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |