| | |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.enums.MessageAlarmStateType; |
| | | import com.hdl.photovoltaic.ui.bean.MessageBean; |
| | | import com.hdl.photovoltaic.utils.TimeUtils; |
| | | |
| | |
| | | holder.item_time_tv.setText(date); |
| | | String type = "";//FAULT:故障,WARN:告警,EVENT:事件 |
| | | Drawable drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_ffb300); |
| | | if (messageBean.getType().equals("FAULT")) { |
| | | if (messageBean.getType().equals(MessageAlarmStateType.fault)) { |
| | | type = mContext.getString(R.string.my_power_station_malfunction); |
| | | drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_e34343); |
| | | } else if (messageBean.getType().equals("WARN")) { |
| | | } else if (messageBean.getType().equals(MessageAlarmStateType.warn)) { |
| | | type = mContext.getString(R.string.message_alarm); |
| | | drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_ffb300); |
| | | } else if (messageBean.getType().equals("EVENT")) { |
| | | } else if (messageBean.getType().equals(MessageAlarmStateType.event)) { |
| | | type = "事件"; |
| | | drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_ffb300); |
| | | } |