From 54cb06b771447df9bca5f3eae88a9caaf8ec51ff Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期一, 22 七月 2024 17:24:10 +0800 Subject: [PATCH] 2024年07月22日17:24:08 --- app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java | 20 ++++++-------------- 1 files changed, 6 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java b/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java index fcc2f67..79c6194 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java @@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import com.google.gson.Gson; import com.google.gson.JsonObject; import com.hdl.linkpm.sdk.core.exception.HDLException; import com.hdl.photovoltaic.R; @@ -148,7 +149,7 @@ viewBinding.allGradeTitleIv.setBackgroundResource(R.drawable.down); viewBinding.allTimeTitleIv.setBackgroundResource(R.drawable.down); List<String> stringList = getTypeList(FilterType.deviceType); - TypeTitleListDialog typeTitleListDialog = new TypeTitleListDialog(_mActivity, stringList); + TypeTitleListDialog typeTitleListDialog = new TypeTitleListDialog(_mActivity, stringList, viewBinding.allDeviceTitleTv.getText().toString()); typeTitleListDialog.show(); typeTitleListDialog.setOnListener(new TypeTitleListDialog.OnClickListener() { @Override @@ -173,7 +174,7 @@ viewBinding.allGradeTitleIv.setBackgroundResource(R.drawable.up); viewBinding.allTimeTitleIv.setBackgroundResource(R.drawable.down); List<String> stringList = getTypeList(FilterType.type); - TypeTitleListDialog typeTitleListDialog = new TypeTitleListDialog(_mActivity, stringList); + TypeTitleListDialog typeTitleListDialog = new TypeTitleListDialog(_mActivity, stringList, viewBinding.allGradeTitleTv.getText().toString()); typeTitleListDialog.show(); typeTitleListDialog.setOnListener(new TypeTitleListDialog.OnClickListener() { @Override @@ -194,7 +195,7 @@ viewBinding.allGradeTitleIv.setBackgroundResource(R.drawable.down); viewBinding.allTimeTitleIv.setBackgroundResource(R.drawable.up); List<String> stringList = getTypeList(FilterType.timeType); - TypeTitleListDialog typeTitleListDialog = new TypeTitleListDialog(_mActivity, stringList); + TypeTitleListDialog typeTitleListDialog = new TypeTitleListDialog(_mActivity, stringList, viewBinding.allTimeTitleTv.getText().toString()); typeTitleListDialog.show(); typeTitleListDialog.setOnListener(new TypeTitleListDialog.OnClickListener() { @Override @@ -269,17 +270,8 @@ messageCenterListAdapter.setNoOnclickListener(new MessageCenterListAdapter.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); } @@ -296,7 +288,7 @@ viewBinding.toolbarTopMessageCenterListRl.topMoreBtn.setVisibility(View.VISIBLE); viewBinding.toolbarTopMessageCenterListRl.topMoreIv.setImageResource(R.drawable.clearall); //榛樿閫変腑鍏ㄩ儴璁惧 - viewBinding.allDeviceTitleIv.setBackgroundResource(R.drawable.up); + viewBinding.allDeviceTitleIv.setBackgroundResource(R.drawable.down); viewBinding.allGradeTitleIv.setBackgroundResource(R.drawable.down); viewBinding.allTimeTitleIv.setBackgroundResource(R.drawable.down); refreshBottomStyle(true); -- Gitblit v1.8.0