| | |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.CustomBaseFragment; |
| | |
| | | import com.hdl.photovoltaic.ui.adapter.MessageAdapter; |
| | | import com.hdl.photovoltaic.ui.bean.MessageBean; |
| | | import com.hdl.photovoltaic.ui.bean.UnCountBean; |
| | | import com.hdl.photovoltaic.widget.TypeTitleListDialog; |
| | | import com.hdl.photovoltaic.widget.BTypeTitleListDialog; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | |
| | | 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.putExtra("messageBean",new Gson().toJson(messageBean)); |
| | | intent.setClass(_mActivity, MessageInfoActivity.class); |
| | | startActivity(intent); |
| | | } |
| | |
| | | * @param stringList 过滤类型值表 |
| | | */ |
| | | private void setTypeTitleListDialog(TextView textView, String filterType, List<String> stringList) { |
| | | TypeTitleListDialog typeTitleListDialog = new TypeTitleListDialog(_mActivity, stringList); |
| | | BTypeTitleListDialog typeTitleListDialog = new BTypeTitleListDialog(_mActivity, stringList); |
| | | typeTitleListDialog.show(); |
| | | typeTitleListDialog.setOnListener(new TypeTitleListDialog.OnClickListener() { |
| | | typeTitleListDialog.setOnListener(new BTypeTitleListDialog.OnClickListener() { |
| | | @Override |
| | | public void onClick(int position, String title) { |
| | | textView.setText(title); |