diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/MsgBoxTabView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/MsgBoxTabView.kt index daa3e140fb..20569f5b53 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/MsgBoxTabView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/MsgBoxTabView.kt @@ -7,6 +7,7 @@ import android.view.LayoutInflater import android.view.View import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat +import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.LinearLayoutManager import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.data.msgbox.MsgBoxBean @@ -21,6 +22,7 @@ import com.mogo.eagle.core.function.call.order.CallerOrderListenerManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.bone.tab.adapter.MsgBoxTabAdapter import com.mogo.eagle.core.function.msgbox.MsgBoxConfig +import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable import com.mogo.eagle.core.utilcode.util.UiThreadHandler import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.* import org.greenrobot.eventbus.EventBus @@ -57,7 +59,11 @@ class MsgBoxTabView @JvmOverloads constructor( msgBoxTabAdapter= MsgBoxTabAdapter(context as Activity) rvMsgBoxList.adapter = msgBoxTabAdapter linearLayoutManager = LinearLayoutManager(context) + linearLayoutManager?.orientation = LinearLayoutManager.VERTICAL rvMsgBoxList.layoutManager = linearLayoutManager + val divider = DividerItemDecoration(context, linearLayoutManager!!.orientation) + getDrawable(R.drawable.rv_divider_line_tab)?.let { divider.setDrawable(it) } + rvMsgBoxList.addItemDecoration(divider) //获取通知消息列表 noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList? diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/adapter/MsgBoxTabAdapter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/adapter/MsgBoxTabAdapter.kt index 16dddfc9b9..abfa103b25 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/adapter/MsgBoxTabAdapter.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/tab/adapter/MsgBoxTabAdapter.kt @@ -457,12 +457,14 @@ class MsgBoxTabAdapter(private val activity: Activity) : holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp, getHourMinFormat()) holder.tvNoticeContent.text = noticeNormalData?.content - GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform( - GlideRoundedCornersTransform( - 20f, - GlideRoundedCornersTransform.CornerType.ALL - ) - ).into(holder.ivNoticeImage) + if(noticeNormalData?.imageUrl?.isNotEmpty() == true){ + GlideApp.with(activity).load(noticeNormalData.imageUrl).optionalTransform( + GlideRoundedCornersTransform( + 20f, + GlideRoundedCornersTransform.CornerType.ALL + ) + ).into(holder.ivNoticeImage) + } holder.tvNoticeCheck.setOnClickListener { //云公告 noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) } @@ -472,13 +474,15 @@ class MsgBoxTabAdapter(private val activity: Activity) : holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp, getHourMinFormat()) holder.tvNoticeContent.text = noticeTrafficStylePushData?.content - GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl) - .optionalTransform( - GlideRoundedCornersTransform( - 20f, - GlideRoundedCornersTransform.CornerType.ALL - ) - ).into(holder.ivNoticeImage) + if(noticeTrafficStylePushData?.poiImgUrl?.isNotEmpty() == true){ + GlideApp.with(activity).load(noticeTrafficStylePushData.poiImgUrl) + .optionalTransform( + GlideRoundedCornersTransform( + 20f, + GlideRoundedCornersTransform.CornerType.ALL + ) + ).into(holder.ivNoticeImage) + } holder.tvNoticeCheck.setOnClickListener { //云公告 noticeTrafficStylePushData?.let { it1 -> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MsgBoxBubbleView.kt index 506fff2706..24a9ce8433 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/MsgBoxBubbleView.kt @@ -51,7 +51,7 @@ class MsgBoxBubbleView @JvmOverloads constructor( var msgBoxBubbleAdapter: MsgBoxBubbleAdapter ?= null - private val TAG = "DriverMsgBoxBubbleView" + private val TAG = "MsgBoxBubbleView" private val dataList :ArrayList = ArrayList() private var isShowData = true private var isShowSummary = false //是否展示汇总消息 @@ -197,7 +197,7 @@ class MsgBoxBubbleView @JvmOverloads constructor( } private fun showData(msgBoxBean: MsgBoxBean){ - clMsgBubbleLayout.visibility = View.VISIBLE + llMsgBubbleLayout.visibility = View.VISIBLE val msgBoxCountDownBean = MsgBoxCountDownBean(msgBoxBean) dataList.add(msgBoxCountDownBean) msgBoxBubbleAdapter?.setData(dataList) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt index fb89246bb1..c2981cf00d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt @@ -181,12 +181,14 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A val noticeNormalData = noticeFrCloudMsg.noticeNormalData holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat()) holder.tvNoticeContent.text = noticeNormalData?.content - GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform( - GlideRoundedCornersTransform( - 20f, - GlideRoundedCornersTransform.CornerType.ALL - ) - ).into(holder.ivNoticeImage) + if(noticeNormalData?.imageUrl?.isNotEmpty() == true){ + GlideApp.with(activity).load(noticeNormalData.imageUrl).optionalTransform( + GlideRoundedCornersTransform( + 20f, + GlideRoundedCornersTransform.CornerType.ALL + ) + ).into(holder.ivNoticeImage) + } holder.tvNoticeCheck.setOnClickListener { //云公告 if (noticeNormalData != null) { @@ -197,12 +199,14 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat()) holder.tvNoticeContent.text = noticeTrafficStylePushData?.content - GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform( - GlideRoundedCornersTransform( - 20f, - GlideRoundedCornersTransform.CornerType.ALL - ) - ).into(holder.ivNoticeImage) + if(noticeTrafficStylePushData?.poiImgUrl?.isNotEmpty() == true){ + GlideApp.with(activity).load(noticeTrafficStylePushData.poiImgUrl).optionalTransform( + GlideRoundedCornersTransform( + 20f, + GlideRoundedCornersTransform.CornerType.ALL + ) + ).into(holder.ivNoticeImage) + } holder.tvNoticeCheck.setOnClickListener { //云公告 if (noticeTrafficStylePushData != null) { @@ -417,7 +421,6 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A //Notice class BubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){ var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage) -// var tvNoticeTitle: TextView = itemView.findViewById(R.id.tvNoticeTitle) var tvNoticeTime: TextView = itemView.findViewById(R.id.tvNoticeTime) var tvNoticeCheck: TextView = itemView.findViewById(R.id.tvNoticeCheck) var tvNoticeContent: TextView = itemView.findViewById(R.id.tvNoticeContent) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-nodpi/bg_tab_msg_box_title.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-nodpi/bg_tab_msg_box_title.png new file mode 100644 index 0000000000..c4f0324598 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-nodpi/bg_tab_msg_box_title.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/rv_divider_line_tab.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/rv_divider_line_tab.xml new file mode 100644 index 0000000000..f6411fcae0 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/rv_divider_line_tab.xml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_autopilot.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_autopilot.xml index 7fb727bf1e..9c834423f7 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_autopilot.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_autopilot.xml @@ -2,6 +2,7 @@ @@ -24,6 +25,7 @@ android:layout_marginStart="@dimen/dp_30" android:textColor="@color/white" android:textSize="@dimen/sp_38" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_fsm.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_fsm.xml index bbeac5e08c..3a276c3d13 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_fsm.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_fsm.xml @@ -2,6 +2,7 @@ @@ -24,6 +25,7 @@ android:layout_marginStart="@dimen/dp_30" android:textSize="@dimen/sp_38" android:textColor="@color/white" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_notice.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_notice.xml index 5d13c330e3..46228d3819 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_notice.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_notice.xml @@ -2,6 +2,7 @@ @@ -25,6 +26,7 @@ android:text="@string/notice_title" android:textColor="@color/white" android:textSize="@dimen/sp_38" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation.xml index cad6212af0..2acd7fa9bd 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation.xml @@ -2,6 +2,7 @@ @@ -25,6 +26,7 @@ android:text="@string/operation_title" android:textSize="@dimen/sp_38" android:textColor="@color/white" + android:textStyle="bold" /> @@ -27,6 +27,7 @@ android:textColor="@color/white" android:layout_marginStart="@dimen/dp_30" android:text="@string/operation_door_title" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_return.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_return.xml index 96327b4318..883c9ba28e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_return.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_return.xml @@ -2,6 +2,7 @@ @@ -27,6 +27,7 @@ app:layout_constraintTop_toTopOf="@id/ivOperationReturnImage" app:layout_constraintLeft_toRightOf="@id/ivOperationReturnImage" android:layout_marginStart="@dimen/dp_30" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_stop.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_stop.xml index 0bc0ae4ebc..cf13978a2d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_stop.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_operation_stop.xml @@ -2,6 +2,7 @@ @@ -27,6 +27,7 @@ android:textColor="@color/white" android:layout_marginStart="@dimen/dp_30" android:text="@string/operation_stop_title" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_ssm.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_ssm.xml index 149f9f118b..6411b5f498 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_ssm.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_ssm.xml @@ -2,6 +2,7 @@ @@ -24,6 +25,7 @@ android:layout_marginStart="@dimen/dp_30" android:textColor="@color/white" android:textSize="@dimen/sp_38" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_summary.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_summary.xml index 4d0e507a5c..d4b9ad9930 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_summary.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_summary.xml @@ -2,6 +2,7 @@ @@ -25,6 +26,7 @@ android:textColor="@color/white" android:textSize="@dimen/sp_38" android:text="@string/summary_title" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_v2x.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_v2x.xml index 7068ef5400..882a89d130 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_v2x.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_tab_v2x.xml @@ -2,6 +2,7 @@ @@ -23,6 +24,7 @@ android:layout_marginStart="@dimen/dp_30" android:textSize="@dimen/sp_38" android:textColor="@color/white" + android:textStyle="bold" /> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml index d0ba8b9a36..052b448533 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_map_container.xml @@ -58,6 +58,35 @@ app:layout_constraintBottom_toTopOf="@+id/shadowView" app:layout_constraintEnd_toStartOf="@+id/visualAngleToggle" /> + + + + + + + + \ No newline at end of file