| | |
| | | package com.hdl.photovoltaic.ui.message; |
| | | |
| | | |
| | | import android.annotation.SuppressLint; |
| | | import android.graphics.drawable.Drawable; |
| | | import android.os.Bundle; |
| | | import android.view.View; |
| | |
| | | private MessageBean mMessageBean; |
| | | |
| | | private String mMsgId; |
| | | private String mMessageStateType; |
| | | |
| | | @Override |
| | | public Object getContentView() { |
| | |
| | | setStatusBarTextColor(); |
| | | try { |
| | | mMsgId = getIntent().getStringExtra("msgId"); |
| | | mMessageStateType = getIntent().getStringExtra("messageStateType"); |
| | | } catch (Exception ignored) { |
| | | } |
| | | |
| | |
| | | type = _mActivity.getString(R.string.message_alarm); |
| | | drawable = AppCompatResources.getDrawable(_mActivity, R.drawable.alarm_ffb300); |
| | | } else if (mMessageBean.getType().equals(MessageAlarmStateType.event)) { |
| | | type = _mActivity.getString(R.string.event); |
| | | drawable = AppCompatResources.getDrawable(_mActivity, R.drawable.alarm_ffb300); |
| | | type = _mActivity.getString(R.string.loading_title_tip); |
| | | drawable = AppCompatResources.getDrawable(_mActivity, R.drawable.state_b9b9b9); |
| | | } |
| | | viewBinding.messageInfoAlarmStateTv.setText(type); |
| | | viewBinding.messageInfoAlarmStateTv.setBackground(drawable); |
| | |
| | | |
| | | private void initEvent() { |
| | | //后退的事件 |
| | | viewBinding.toolbarTopIn.topBackBtn.setOnClickListener(new View.OnClickListener() { |
| | | viewBinding.toolbarTopIn.topBackLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (mMessageBean == null) { |
| | |
| | | sendEventBus(); |
| | | } |
| | | finish(); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | viewBinding.toolbarTopIn.topTitleTv.setText(R.string.message_alarm_info); |
| | | viewBinding.toolbarTopIn.topTitleTv.setTextColor(getResources().getColor(R.color.text_030D1C, null)); |
| | | viewBinding.toolbarTopIn.topBackBtn.setVisibility(View.VISIBLE); |
| | | viewBinding.toolbarTopIn.topBackLl.setVisibility(View.VISIBLE); |
| | | viewBinding.toolbarTopIn.topBarView.setBackgroundColor(getResources().getColor(R.color.text_FFFFFFFF, null)); |
| | | |
| | | if (!UserConfigManage.getInstance().isBAccount()) { |
| | |
| | | viewBinding.messageInfoAlarmRangeIn.rightContentTv.setText(""); |
| | | viewBinding.messageInfoPowerStationLocationIn.rightContentTv.setText(""); |
| | | viewBinding.messageInfoAlarmTimeIn.rightContentTv.setText(""); |
| | | |
| | | if (mMessageStateType.equals(MessageStateType.processed)) { |
| | | //已经解决掉的隐藏 |
| | | viewBinding.messageInfoBackTv.setVisibility(View.GONE); |
| | | viewBinding.messageInfoSolveTv.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | } |