[opt3.0]消息盒子

This commit is contained in:
xuxinchao
2023-02-22 11:47:37 +08:00
parent 68bf702467
commit 57316383c4
23 changed files with 1164 additions and 6 deletions

View File

@@ -7,6 +7,7 @@ import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
@@ -83,9 +84,13 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
if(isShowData){
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
if(category == MsgCategory.RECORD_BAG){
//弹出被动录包弹窗
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
}else{
if(!FunctionBuildConfig.isDemoMode){
//弹出被动录包弹窗
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
}
} else if(category == MsgCategory.SYS_INFO){
//todo 过滤MAP系统异常报警
} else{
clMsgBubbleLayout.visibility = View.VISIBLE
dataList.add(msgBoxBean)
driverMsgBoxBubbleAdapter?.setData(dataList)

View File

@@ -7,6 +7,7 @@ import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
@@ -17,6 +18,7 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.*
import org.greenrobot.eventbus.EventBus
@@ -244,6 +246,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
notifyData()
ipcReportList?.let {
linearLayoutManager?.scrollToPositionWithOffset(it.indexOf(msgBoxBean),0)
driverMsgBoxListAdapter?.setReportShowData(msgBoxBean)
}
}
}

View File

@@ -0,0 +1,79 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox
import android.app.Activity
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.MMsgBoxBubbleAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_m_msg_box_bubble.view.*
class MMsgBoxBubbleView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
private val TAG = "MMsgBoxBubbleView"
private val dataList :ArrayList<MsgBoxBean> = ArrayList()
private var mMsgBoxBubbleAdapter: MMsgBoxBubbleAdapter?= null
private var isShowData = true
init {
LayoutInflater.from(context).inflate(R.layout.layout_m_msg_box_bubble, this, true)
initView()
}
private fun initView(){
val linearLayoutManager = LinearLayoutManager(context)
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
mMsgBoxBubbleAdapter = MMsgBoxBubbleAdapter(context as Activity)
rvMBubbleList.adapter = mMsgBoxBubbleAdapter
rvMBubbleList.layoutManager = linearLayoutManager
}
/**
* 是否展示接收消息,消息盒子打开状态下不再展示气泡消息
* @param show true 展示false 不展示
*/
fun isShowData(show: Boolean){
isShowData = show
}
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
UiThreadHandler.post {
if(category == MsgCategory.NOTICE){
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|| msgBoxList.type == MsgBoxType.OBU){
MsgBoxConfig.noticeList.add(msgBoxList)
if(isShowData){
CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true)
dataList.add(msgBoxList)
mMsgBoxBubbleAdapter?.setData(dataList)
}
}
}
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxListenerManager.removeListener(TAG)
}
}

View File

@@ -0,0 +1,85 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.hmi.R
import kotlinx.android.synthetic.main.view_m1_msg_box_button.view.*
class MMsgBoxButtonView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
): ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxEventListener {
companion object {
const val TAG = "MMsgBoxButtonView"
}
private var clickListener: ClickListener? = null
init{
LayoutInflater.from(context).inflate(R.layout.view_m1_msg_box_button, this, true)
initView()
}
private fun initView(){
cbMsgBoxM1.setOnCheckedChangeListener { _, isChecked ->
clickListener?.showMsgBoxList(isChecked)
msgBoxMTipView.visibility = View.GONE
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxEventListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxEventListenerManager.removeListener(TAG)
}
override fun onSummaryClickEvent() {
}
/**
* 更新新消息提醒红点
* @param isShow true:展示false:不展示
*/
override fun onUpdateTipEvent(isShow: Boolean) {
if(isShow){
msgBoxMTipView.visibility = View.VISIBLE
}else{
msgBoxMTipView.visibility = View.GONE
}
}
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxM1.performClick()
}
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxM1.performClick()
}
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
cbMsgBoxM1.performClick()
}
fun setClickListener(clickListener: ClickListener) {
this.clickListener = clickListener
}
interface ClickListener{
fun showMsgBoxList(show: Boolean)
}
}

View File

@@ -0,0 +1,105 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox
import android.app.Activity
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.MMsgBoxListAdapter
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_m_msg_box_list.view.*
class MMsgBoxListView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IMsgBoxEventListener {
private val TAG = "MMsgBoxListView"
var mMsgBoxListAdapter: MMsgBoxListAdapter?= null
private var noticeList: ArrayList<MsgBoxBean> ?= null
init{
LayoutInflater.from(context).inflate(R.layout.layout_m_msg_box_list, this, true)
initView()
}
private fun initView(){
val linearLayoutManager = LinearLayoutManager(context)
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
val divider = DividerItemDecoration(context, linearLayoutManager.orientation)
getDrawable(R.drawable.rv_divider_line_m)?.let { divider.setDrawable(it) }
mMsgBoxListAdapter = MMsgBoxListAdapter(context as Activity)
rvMList.adapter = mMsgBoxListAdapter
rvMList.layoutManager = linearLayoutManager
rvMList.addItemDecoration(divider)
//获取通知消息列表
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
noticeList = noticeList?.let { ArrayList(it.reversed()) }
noticeList?.let {
mMsgBoxListAdapter?.setData(it)
}
}
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
UiThreadHandler.post{
if(category == MsgCategory.NOTICE){
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|| msgBoxList.type == MsgBoxType.OBU){
noticeList?.add(0,msgBoxList)
noticeList?.let {
mMsgBoxListAdapter?.setData(it)
}
}
}
}
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerMsgBoxListenerManager.addListener(TAG,this)
CallerMsgBoxEventListenerManager.addListener(TAG,this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerMsgBoxListenerManager.removeListener(TAG)
CallerMsgBoxEventListenerManager.removeListener(TAG)
}
override fun onSummaryClickEvent() {
}
override fun onUpdateTipEvent(isShow: Boolean) {
}
override fun onBubbleOperationClickEvent(msgBoxBean: MsgBoxBean) {
}
override fun onBubbleV2XClickEvent(msgBoxBean: MsgBoxBean) {
noticeList?.let {
rvMList.scrollToPosition(it.indexOf(msgBoxBean))
}
}
override fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean) {
}
}

View File

@@ -32,6 +32,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private var data: List<MsgBoxBean>? = null
private var reportBean: MsgBoxBean ?= null
private val operation: Int = 1
private val notice: Int = 2
@@ -50,6 +51,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
notifyDataSetChanged()
}
fun setReportShowData(reportClickBean: MsgBoxBean){
reportBean = reportClickBean
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
when (viewType) {
record -> {
@@ -103,6 +108,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
}
is MsgBoxIpcReportHolder -> {
data?.let { it ->
val reportMsgBox = it[position]
holder.tvReportTimeNormal.text =
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
holder.tvReportTimeOpen.text =
@@ -138,6 +144,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.tvReportTypeNormal.text = resultStr
holder.tvReportTypeOpen.text = resultStr
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
holder.tvReportSrcOpen.text = "消息来源:${reportEntity.src}"
var actionStr = ""
for (action in reportEntity.actionsList) {
actionStr =
@@ -152,6 +159,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
null,
null
)
holder.tvStatusSelect.text = "折叠"
holder.ivReportImageNormal.visibility = View.GONE
holder.tvReportLevelNormal.visibility = View.GONE
holder.tvReportTimeNormal.visibility = View.GONE
@@ -162,6 +170,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.tvReportTimeOpen.visibility = View.VISIBLE
holder.tvReportTypeOpen.visibility = View.VISIBLE
holder.tvReportReasonOpen.visibility = View.VISIBLE
holder.tvReportSrcOpen.visibility = View.VISIBLE
holder.tvReportActionOpen.visibility = View.VISIBLE
} else {
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
@@ -170,6 +179,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
null,
null
)
holder.tvStatusSelect.text = "展开"
holder.ivReportImageNormal.visibility = View.VISIBLE
holder.tvReportLevelNormal.visibility = View.VISIBLE
holder.tvReportTimeNormal.visibility = View.VISIBLE
@@ -180,9 +190,16 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.tvReportTimeOpen.visibility = View.GONE
holder.tvReportTypeOpen.visibility = View.GONE
holder.tvReportReasonOpen.visibility = View.GONE
holder.tvReportSrcOpen.visibility = View.GONE
holder.tvReportActionOpen.visibility = View.GONE
}
}
reportBean?.let {
if(reportMsgBox.timestamp == it.timestamp){
holder.tvStatusSelect.performClick()
}
}
}
}
is MsgBoxOperation -> {
@@ -200,6 +217,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
null,
null
)
holder.tvOperationStatusSelect.text = "折叠"
holder.ivOperationImageNormal.visibility = View.GONE
holder.tvOperationTitleNormal.visibility = View.GONE
holder.tvOperationContentNormal.visibility = View.GONE
@@ -214,6 +232,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
null,
null
)
holder.tvOperationStatusSelect.text = "展开"
holder.ivOperationImageNormal.visibility = View.VISIBLE
holder.tvOperationTitleNormal.visibility = View.VISIBLE
holder.tvOperationContentNormal.visibility = View.VISIBLE
@@ -329,6 +348,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
var tvReportTimeOpen: TextView = itemView.findViewById(R.id.tvReportTimeOpen)
var tvReportTypeOpen: TextView = itemView.findViewById(R.id.tvReportTypeOpen)
var tvReportReasonOpen: TextView = itemView.findViewById(R.id.tvReportReasonOpen)
var tvReportSrcOpen: TextView = itemView.findViewById(R.id.tvReportSrcOpen)
var tvReportActionOpen: TextView = itemView.findViewById(R.id.tvReportActionOpen)
}

View File

@@ -0,0 +1,178 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
import android.app.Activity
import android.os.CountDownTimer
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
import com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
class MMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private var data: ArrayList<MsgBoxBean> ?= null
private val notice: Int = 1
private val v2x: Int = 2
private val summary: Int = 3
var countDownTimer: CountDownTimer?=null
fun setData(data: ArrayList<MsgBoxBean>){
this.data = data
if(data.size>3){
data.removeAt(0)
}
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return when (viewType) {
notice -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_box_notice,parent,false)
BubbleNoticeHolder(view)
}
summary -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_box_summary,parent,false)
BubbleSummaryHolder(view)
}
else -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_box_v2x,parent,false)
BubbleV2XHolder(view)
}
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
when (holder) {
is BubbleNoticeHolder -> {
data?.let {
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
if(noticeFrCloudMsg.type == 0){
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
holder.tvMNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMNoticeContent.text = noticeNormalData?.content
GlideApp.with(activity).load(noticeNormalData?.imageUrl).placeholder(R.drawable.icon_passenger_operation)
.optionalTransform(
GlideRoundedCornersTransform(
20f,
GlideRoundedCornersTransform.CornerType.ALL
)
).into(holder.ivMNoticeImage)
holder.tvMNoticeCheck.setOnClickListener {
//云公告
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
}
}else if(noticeFrCloudMsg.type == 1){
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
holder.tvMNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMNoticeContent.text = noticeTrafficStylePushData?.content
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).placeholder(R.drawable.icon_passenger_operation)
.optionalTransform(
GlideRoundedCornersTransform(
20f,
GlideRoundedCornersTransform.CornerType.ALL
)
).into(holder.ivMNoticeImage)
holder.tvMNoticeCheck.setOnClickListener {
//云公告
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
}
}
}
}
is BubbleV2XHolder -> {
data?.let {
val msgBoxBean = it[position]
val v2XMsg = msgBoxBean.bean as V2XMsg
holder.tvMV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMV2XContent.text = v2XMsg.content
holder.ivMV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
holder.clMVeXLayout.setOnClickListener {
CallerMsgBoxEventListenerManager.invokeBubbleV2XListener(msgBoxBean)
}
}
}
is BubbleSummaryHolder -> {
data?.let {
val summaryMsg= it[position].bean as V2XMsg
holder.tvMSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMSummaryContent.text = summaryMsg.content
holder.tvMSummaryCheck.setOnClickListener {
//跳转全览模式
// CallerHmiManager.showSmallFragment()
CallerMsgBoxEventListenerManager.invokeSummaryListener()
}
}
}
}
val msgBoxBean: MsgBoxBean = data!![position]
countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),1000){
override fun onTick(p0: Long) {
}
override fun onFinish() {
data?.remove(msgBoxBean)
notifyDataSetChanged()
// notifyItemRemoved(index)
// notifyItemRangeChanged(index,recordTypeEntity.size-index)
}
}
countDownTimer?.start()
}
override fun getItemCount() = data?.size ?: 0
override fun getItemViewType(position: Int): Int {
return if(data!![position].type == MsgBoxType.NOTICE){
notice
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
summary
} else{
v2x
}
}
//Notice
class BubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var ivMNoticeImage: ImageView = itemView.findViewById(R.id.ivMNoticeImage)
var tvMNoticeTitle: TextView = itemView.findViewById(R.id.tvMNoticeTitle)
var tvMNoticeContent: TextView = itemView.findViewById(R.id.tvMNoticeContent)
var tvMNoticeCheck: TextView = itemView.findViewById(R.id.tvMNoticeCheck)
var tvMNoticeTime: TextView = itemView.findViewById(R.id.tvMNoticeTime)
}
//OBU、V2X
class BubbleV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var ivMV2XImage: ImageView = itemView.findViewById(R.id.ivMV2XImage)
var tvMV2XTime: TextView = itemView.findViewById(R.id.tvMV2XTime)
var tvMV2XContent: TextView = itemView.findViewById(R.id.tvMV2XContent)
var clMVeXLayout: RoundCanClickConstraintLayout = itemView.findViewById(R.id.clMVeXLayout)
}
//汇总消息
class BubbleSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvMSummaryContent: TextView = itemView.findViewById(R.id.tvMSummaryContent)
var tvMSummaryCheck: TextView = itemView.findViewById(R.id.tvMSummaryCheck)
var tvMSummaryTime: TextView = itemView.findViewById(R.id.tvMSummaryTime)
}
}

View File

@@ -0,0 +1,152 @@
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
import android.app.Activity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
class MMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private var data: List<MsgBoxBean> ?= null
private val notice: Int = 1
private val v2x: Int = 2
private val summary: Int = 3
fun setData(data: List<MsgBoxBean>){
this.data = data
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return when (viewType) {
notice -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_list_notice,parent,false)
ListNoticeHolder(view)
}
summary -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_list_summary,parent,false)
ListSummaryHolder(view)
}
else -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_m_msg_list_v2x,parent,false)
ListV2XHolder(view)
}
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
when (holder) {
is ListNoticeHolder -> {
data?.let {
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
if(noticeFrCloudMsg.type == 0){
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
holder.tvMNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMNoticeContent.text = noticeNormalData?.content
GlideApp.with(activity).load(noticeNormalData?.imageUrl).placeholder(R.drawable.icon_notice_default)
.optionalTransform(
GlideRoundedCornersTransform(
20f,
GlideRoundedCornersTransform.CornerType.ALL
)
).into(holder.ivMNoticeImage)
holder.tvMNoticeCheck.setOnClickListener {
//云公告
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
}
}else if(noticeFrCloudMsg.type == 1){
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
holder.tvMNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMNoticeContent.text = noticeTrafficStylePushData?.content
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).placeholder(R.drawable.icon_notice_default)
.optionalTransform(
GlideRoundedCornersTransform(
20f,
GlideRoundedCornersTransform.CornerType.ALL
)
).into(holder.ivMNoticeImage)
holder.tvMNoticeCheck.setOnClickListener {
//云公告
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
}
}
}
}
is ListV2XHolder -> {
data?.let {
val msgBoxBean = it[position]
val v2XMsg = msgBoxBean.bean as V2XMsg
holder.tvMV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMV2XContent.text = v2XMsg.content
holder.ivMV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}
}
is ListSummaryHolder -> {
data?.let {
val summaryMsg= it[position].bean as V2XMsg
holder.tvMSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvMSummaryContent.text = summaryMsg.content
holder.tvMSummaryCheck.setOnClickListener {
//跳转全览模式
// CallerHmiManager.showSmallFragment()
CallerMsgBoxEventListenerManager.invokeSummaryListener()
}
}
}
}
}
override fun getItemCount() = data?.size ?: 0
override fun getItemViewType(position: Int): Int {
return if(data!![position].type == MsgBoxType.NOTICE){
notice
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
summary
} else{
v2x
}
}
//Notice
class ListNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var ivMNoticeImage: ImageView = itemView.findViewById(R.id.ivMNoticeImage)
var tvMNoticeTitle: TextView = itemView.findViewById(R.id.tvMNoticeTitle)
var tvMNoticeContent: TextView = itemView.findViewById(R.id.tvMNoticeContent)
var tvMNoticeCheck: TextView = itemView.findViewById(R.id.tvMNoticeCheck)
var tvMNoticeTime: TextView = itemView.findViewById(R.id.tvMNoticeTime)
}
//OBU、V2X
class ListV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var ivMV2XImage: ImageView = itemView.findViewById(R.id.ivMV2XImage)
var tvMV2XTime: TextView = itemView.findViewById(R.id.tvMV2XTime)
var tvMV2XContent: TextView = itemView.findViewById(R.id.tvMV2XContent)
}
//汇总消息
class ListSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var tvMSummaryContent: TextView = itemView.findViewById(R.id.tvMSummaryContent)
var tvMSummaryCheck: TextView = itemView.findViewById(R.id.tvMSummaryCheck)
var tvMSummaryTime: TextView = itemView.findViewById(R.id.tvMSummaryTime)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FFC0C7DA"/>
<size android:height="1dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/icon_msg_box_m_normal" android:state_checked="false" />
<item android:drawable="@drawable/icon_msg_box_m_select" android:state_checked="true" />
</selector>

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_450"
android:layout_height="@dimen/dp_110"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#FFFFFFFF"
app:roundLayoutRadius="@dimen/dp_18"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
>
<ImageView
android:id="@+id/ivMNoticeImage"
android:layout_width="@dimen/dp_110"
android:layout_height="@dimen/dp_110"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/icon_passenger_operation"
/>
<TextView
android:id="@+id/tvMNoticeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="官方公告"
android:textColor="#FF203555"
android:textSize="@dimen/dp_25"
android:textStyle="bold"
android:layout_marginStart="@dimen/dp_10"
app:layout_constraintLeft_toRightOf="@id/ivMNoticeImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvMNoticeContent"
/>
<TextView
android:id="@+id/tvMNoticeContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#CC203555"
android:textSize="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tvMNoticeTitle"
app:layout_constraintTop_toBottomOf="@id/tvMNoticeTitle"
app:layout_constraintRight_toRightOf="@id/tvMNoticeTime"
android:gravity="start"
android:maxLines="1"
android:ellipsize="end"
/>
<TextView
android:id="@+id/tvMNoticeCheck"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_110"
android:text="查 看"
android:textColor="#FF1366FB"
android:textSize="@dimen/dp_20"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:gravity="center"
/>
<View
android:layout_width="1dp"
android:layout_height="64dp"
android:background="#FFC0C7DA"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/tvMNoticeCheck"
/>
<TextView
android:id="@+id/tvMNoticeTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#B34A5B77"
android:textSize="@dimen/dp_18"
app:layout_constraintTop_toTopOf="@id/tvMNoticeTitle"
app:layout_constraintBottom_toBottomOf="@id/tvMNoticeTitle"
app:layout_constraintRight_toLeftOf="@id/tvMNoticeCheck"
android:layout_marginEnd="@dimen/dp_15"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="450dp"
android:layout_height="110dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#FFFFFFFF"
app:roundLayoutRadius="@dimen/dp_18"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
>
<ImageView
android:id="@+id/ivMSummaryImage"
android:layout_width="110dp"
android:layout_height="110dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/icon_passenger_operation"
/>
<TextView
android:id="@+id/tvMSummaryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="蘑菇小助手"
android:textColor="#FF203555"
android:textSize="25dp"
android:layout_marginStart="10dp"
app:layout_constraintLeft_toRightOf="@id/ivMSummaryImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvMSummaryContent"
/>
<TextView
android:id="@+id/tvMSummaryContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#CC203555"
android:textSize="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tvMSummaryTitle"
app:layout_constraintTop_toBottomOf="@id/tvMSummaryTitle"
app:layout_constraintRight_toRightOf="@id/tvMSummaryTime"
android:gravity="start"
/>
<TextView
android:id="@+id/tvMSummaryCheck"
android:layout_width="110dp"
android:layout_height="110dp"
android:text="查 看"
android:textColor="#FF1366FB"
android:textSize="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:gravity="center"
/>
<View
android:layout_width="1dp"
android:layout_height="64dp"
android:background="#C0C7DA"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/tvMSummaryCheck"
/>
<TextView
android:id="@+id/tvMSummaryTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#B34A5B77"
android:textSize="18dp"
app:layout_constraintTop_toTopOf="@id/tvMSummaryTitle"
app:layout_constraintBottom_toBottomOf="@id/tvMSummaryTitle"
app:layout_constraintRight_toLeftOf="@id/tvMSummaryCheck"
android:layout_marginEnd="10dp"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clMVeXLayout"
android:layout_width="450dp"
android:layout_height="110dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#FFFFFFFF"
app:roundLayoutRadius="@dimen/dp_18"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10">
<ImageView
android:id="@+id/ivMV2XImage"
android:layout_width="@dimen/dp_83"
android:layout_height="@dimen/dp_83"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginStart="@dimen/dp_13"
/>
<TextView
android:id="@+id/tvMV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#99203555"
android:textSize="18dp"
android:layout_marginEnd="@dimen/dp_20"
/>
<TextView
android:id="@+id/tvMV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvMV2XTime"
android:gravity="start"
android:maxLines="1"
android:ellipsize="end"
android:textColor="#FF203555"
android:textSize="25dp"
android:textStyle="bold"
android:layout_marginStart="@dimen/dp_13"
android:layout_marginEnd="@dimen/dp_13"
/>
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_100"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivMNoticeImage"
android:layout_width="@dimen/dp_68"
android:layout_height="@dimen/dp_68"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/icon_passenger_operation"
android:layout_marginStart="@dimen/dp_16"
/>
<TextView
android:id="@+id/tvMNoticeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="官方公告"
android:textColor="#FF203555"
android:textSize="@dimen/dp_25"
android:layout_marginStart="@dimen/dp_16"
app:layout_constraintLeft_toRightOf="@id/ivMNoticeImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvMNoticeContent"
android:textStyle="bold"
/>
<TextView
android:id="@+id/tvMNoticeContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#CC203555"
android:textSize="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tvMNoticeTitle"
app:layout_constraintTop_toBottomOf="@id/tvMNoticeTitle"
app:layout_constraintRight_toRightOf="@id/tvMNoticeTime"
android:gravity="start"
android:maxLines="1"
android:ellipsize="end"
/>
<TextView
android:id="@+id/tvMNoticeCheck"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_100"
android:text="查 看"
android:textColor="#FF1366FB"
android:textSize="20dp"
android:paddingEnd="@dimen/dp_10"
android:paddingStart="@dimen/dp_20"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:gravity="center"
/>
<View
android:layout_width="@dimen/dp_1"
android:layout_height="@dimen/dp_55"
android:background="#FFC0C7DA"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/tvMNoticeCheck"
/>
<TextView
android:id="@+id/tvMNoticeTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF4A5B76"
android:textSize="@dimen/dp_18"
app:layout_constraintTop_toTopOf="@id/tvMNoticeTitle"
app:layout_constraintBottom_toBottomOf="@id/tvMNoticeTitle"
app:layout_constraintRight_toLeftOf="@id/tvMNoticeCheck"
android:layout_marginEnd="@dimen/dp_15"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_100"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivMSummaryImage"
android:layout_width="68dp"
android:layout_height="68dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/icon_passenger_operation"
android:layout_marginStart="@dimen/dp_16"
/>
<TextView
android:id="@+id/tvMSummaryTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="蘑菇小助手"
android:textColor="#FF203555"
android:textSize="25dp"
android:layout_marginStart="20dp"
app:layout_constraintLeft_toRightOf="@id/ivMSummaryImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvMSummaryContent"
/>
<TextView
android:id="@+id/tvMSummaryContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="#CC203555"
android:textSize="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMSummaryTitle"
app:layout_constraintLeft_toLeftOf="@id/tvMSummaryTitle"
app:layout_constraintRight_toRightOf="@id/tvMSummaryTime"
android:gravity="start"
/>
<TextView
android:id="@+id/tvMSummaryCheck"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="查 看"
android:textColor="#FF1366FB"
android:textSize="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:gravity="center"
/>
<View
android:layout_width="1dp"
android:layout_height="50dp"
android:background="#C0C7DA"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/tvMSummaryCheck"
/>
<TextView
android:id="@+id/tvMSummaryTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#CC203555"
android:textSize="18dp"
app:layout_constraintTop_toTopOf="@id/tvMSummaryTitle"
app:layout_constraintBottom_toBottomOf="@id/tvMSummaryTitle"
app:layout_constraintRight_toLeftOf="@id/tvMSummaryCheck"
android:layout_marginEnd="10dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_100"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivMV2XImage"
android:layout_width="@dimen/dp_68"
android:layout_height="@dimen/dp_68"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginStart="@dimen/dp_16"
/>
<TextView
android:id="@+id/tvMV2XTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textColor="#FF4A5B76"
android:textSize="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_10"
/>
<TextView
android:id="@+id/tvMV2XContent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivMV2XImage"
app:layout_constraintRight_toLeftOf="@id/tvMV2XTime"
android:textStyle="bold"
android:gravity="start"
android:maxLines="1"
android:ellipsize="end"
android:textColor="#FF203555"
android:textSize="@dimen/dp_25"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -70,7 +70,7 @@
android:id="@+id/tvStatusSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="折叠"
android:text="展开"
android:textColor="#FFFFFFFF"
android:textSize="24dp"
app:layout_constraintTop_toTopOf="parent"
@@ -163,12 +163,26 @@
/>
<TextView
android:id="@+id/tvReportActionOpen"
android:id="@+id/tvReportSrcOpen"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvReportReasonOpen"
app:layout_constraintLeft_toLeftOf="@id/tvReportReasonOpen"
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
android:textColor="#B3FFFFFF"
android:textSize="28dp"
android:gravity="start"
android:lineSpacingMultiplier="1.2"
android:visibility="gone"
/>
<TextView
android:id="@+id/tvReportActionOpen"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvReportSrcOpen"
app:layout_constraintLeft_toLeftOf="@id/tvReportSrcOpen"
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="15dp"
android:textColor="#B3FFFFFF"

View File

@@ -59,7 +59,7 @@
android:id="@+id/tvOperationStatusSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="折叠"
android:text="展开"
android:textColor="#FFFFFFFF"
android:textSize="24dp"
app:layout_constraintTop_toTopOf="parent"

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rvMBubbleList"
android:layout_width="@dimen/dp_450"
android:layout_height="wrap_content"
>
</androidx.recyclerview.widget.RecyclerView>

View File

@@ -0,0 +1,38 @@
<LinearLayout
android:layout_width="@dimen/dp_450"
android:layout_height="@dimen/dp_520"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
>
<com.mogo.eagle.core.function.hmi.ui.msgbox.SharpView
android:layout_width="@dimen/dp_25"
android:layout_height="@dimen/dp_25"
android:layout_gravity="end"
android:layout_marginEnd="@dimen/dp_35"
/>
<com.mogo.eagle.core.widget.RoundConstraintLayout
android:layout_width="@dimen/dp_450"
android:layout_height="@dimen/dp_490"
android:background="#FFFFFFFF"
app:roundLayoutRadius="@dimen/dp_18"
>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvMList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginStart="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_18"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>
</LinearLayout>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/dp_148"
android:layout_height="@dimen/dp_148"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<!--消息盒子M1选择入口-->
<CheckBox
android:id="@+id/cbMsgBoxM1"
android:layout_width="@dimen/dp_148"
android:layout_height="@dimen/dp_148"
android:background="@drawable/selector_msg_box_m"
android:button="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<!--乘客端消息提示-->
<View
android:id="@+id/msgBoxMTipView"
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/version_upgrade_tips_background"
android:translationZ="30dp"
app:layout_constraintCircle="@id/cbMsgBoxM1"
app:layout_constraintCircleAngle="35"
app:layout_constraintCircleRadius="25dp"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>