Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0
This commit is contained in:
@@ -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.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)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.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)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.api.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) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
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).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).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)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
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).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).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 |
@@ -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="#C0C7DA"/>
|
||||
<size android:height="1dp" />
|
||||
|
||||
</shape>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMNoticeImage"
|
||||
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/tvMNoticeTitle"
|
||||
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/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="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/tvMNoticeCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMNoticeTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#B34A5B77"
|
||||
android:textSize="18dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvMNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvMNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvMNoticeCheck"
|
||||
android:layout_marginEnd="10dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -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="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
>
|
||||
|
||||
<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>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?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="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMV2XImage"
|
||||
android:layout_width="83dp"
|
||||
android:layout_height="83dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="10dp"
|
||||
/>
|
||||
|
||||
<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="20dp"
|
||||
/>
|
||||
|
||||
<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:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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="100dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMNoticeImage"
|
||||
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="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMNoticeTitle"
|
||||
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/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="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/tvMNoticeCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMNoticeTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#CC203555"
|
||||
android:textSize="18dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvMNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvMNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvMNoticeCheck"
|
||||
android:layout_marginEnd="10dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -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="100dp"
|
||||
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="10dp"
|
||||
/>
|
||||
|
||||
<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>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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="100dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivMV2XImage"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="68dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="10dp"
|
||||
/>
|
||||
|
||||
<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="#CC203555"
|
||||
android:textSize="18dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
/>
|
||||
|
||||
<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:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -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="450dp"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
@@ -0,0 +1,21 @@
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="450dp"
|
||||
android:layout_height="520dp"
|
||||
android:background="#FFFFFFFF"
|
||||
app:roundLayoutRadius="40dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<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="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="79dp"
|
||||
android:layout_height="79dp"
|
||||
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="79dp"
|
||||
android:layout_height="79dp"
|
||||
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="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxM1"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="50dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user