[6.7.0]UI调整

This commit is contained in:
xuxinchao
2024-09-26 19:53:53 +08:00
parent dae971db9f
commit 442fcf5205
18 changed files with 144 additions and 58 deletions

View File

@@ -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<MsgBoxBean>?

View File

@@ -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 ->

View File

@@ -51,7 +51,7 @@ class MsgBoxBubbleView @JvmOverloads constructor(
var msgBoxBubbleAdapter: MsgBoxBubbleAdapter ?= null
private val TAG = "DriverMsgBoxBubbleView"
private val TAG = "MsgBoxBubbleView"
private val dataList :ArrayList<MsgBoxCountDownBean> = 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)

View File

@@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 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="#979797"/>
<size android:height="@dimen/dp_1" />
</shape>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -10,7 +11,7 @@
android:layout_height="@dimen/dp_120"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:src="@drawable/icon_warning_take_over"
android:contentDescription="@string/autopilot_icon"
/>
@@ -24,6 +25,7 @@
android:layout_marginStart="@dimen/dp_30"
android:textColor="@color/white"
android:textSize="@dimen/sp_38"
android:textStyle="bold"
/>
<TextView
@@ -46,6 +48,8 @@
app:layout_constraintRight_toRightOf="@id/tvAutopilotTime"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -11,7 +12,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:src="@drawable/icon_warning_take_over"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/fsm_icon"
/>
@@ -24,6 +25,7 @@
android:layout_marginStart="@dimen/dp_30"
android:textSize="@dimen/sp_38"
android:textColor="@color/white"
android:textStyle="bold"
/>
<TextView
@@ -46,6 +48,8 @@
app:layout_constraintRight_toRightOf="@id/tvFSMTime"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -11,7 +12,7 @@
android:src="@drawable/icon_tab_notice"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/notice_icon"
/>
@@ -25,6 +26,7 @@
android:text="@string/notice_title"
android:textColor="@color/white"
android:textSize="@dimen/sp_38"
android:textStyle="bold"
/>
<TextView
@@ -55,14 +57,12 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="@id/tvNoticeTitle"
app:layout_constraintRight_toLeftOf="@id/tvNoticeCheck"
app:layout_constraintTop_toTopOf="@id/tvNoticeCheck"
app:layout_constraintBottom_toBottomOf="@id/tvNoticeCheck"
android:gravity="start"
android:maxLines="1"
android:ellipsize="end"
app:layout_constraintRight_toLeftOf="@id/tvNoticeTime"
app:layout_constraintTop_toBottomOf="@id/tvNoticeTitle"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -10,7 +11,7 @@
android:layout_height="@dimen/dp_120"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:src="@drawable/icon_msg_box_operation"
android:contentDescription="@string/operation_icon"
/>
@@ -25,6 +26,7 @@
android:text="@string/operation_title"
android:textSize="@dimen/sp_38"
android:textColor="@color/white"
android:textStyle="bold"
/>
<TextView
@@ -36,6 +38,8 @@
app:layout_constraintRight_toRightOf="parent"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
<TextView

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -12,8 +13,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:src="@drawable/v2x_icon_shigu_sanjiaopai"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/operation_door_icon"
/>
@@ -27,6 +27,7 @@
android:textColor="@color/white"
android:layout_marginStart="@dimen/dp_30"
android:text="@string/operation_door_title"
android:textStyle="bold"
/>
<TextView
@@ -49,8 +50,8 @@
app:layout_constraintBottom_toBottomOf="@id/ivOperationDoorImage"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -12,8 +13,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/operation_return_icon"
/>
@@ -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"
/>
<TextView
@@ -49,9 +50,8 @@
app:layout_constraintBottom_toBottomOf="@id/ivOperationReturnImage"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:gravity="start"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -12,8 +13,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:src="@drawable/icon_msg_box_operation_stop"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginBottom="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/operation_stop_icon"
/>
@@ -27,6 +27,7 @@
android:textColor="@color/white"
android:layout_marginStart="@dimen/dp_30"
android:text="@string/operation_stop_title"
android:textStyle="bold"
/>
<TextView
@@ -49,8 +50,8 @@
app:layout_constraintBottom_toBottomOf="@id/ivOperationStopImage"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -11,7 +12,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/icon_warning_take_over"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/ssm_icon"
/>
@@ -24,6 +25,7 @@
android:layout_marginStart="@dimen/dp_30"
android:textColor="@color/white"
android:textSize="@dimen/sp_38"
android:textStyle="bold"
/>
<TextView
@@ -46,6 +48,8 @@
app:layout_constraintRight_toRightOf="@id/tvSsmTime"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -11,7 +12,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:src="@drawable/icon_tab_notice"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/summary_icon"
/>
@@ -25,6 +26,7 @@
android:textColor="@color/white"
android:textSize="@dimen/sp_38"
android:text="@string/summary_title"
android:textStyle="bold"
/>
<TextView
@@ -47,7 +49,8 @@
app:layout_constraintRight_toRightOf="@id/tvSummaryTime"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:gravity="start"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
@@ -10,7 +11,7 @@
android:layout_height="@dimen/dp_120"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_30"
android:contentDescription="@string/v2x_icon"
/>
@@ -23,6 +24,7 @@
android:layout_marginStart="@dimen/dp_30"
android:textSize="@dimen/sp_38"
android:textColor="@color/white"
android:textStyle="bold"
/>
<TextView
@@ -45,6 +47,8 @@
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:layout_marginTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_30"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -58,6 +58,35 @@
app:layout_constraintBottom_toTopOf="@+id/shadowView"
app:layout_constraintEnd_toStartOf="@+id/visualAngleToggle" />
<com.mogo.eagle.core.function.hmi.ui.widget.SingleTrafficLightView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
android:visibility="gone"
/>
<com.mogo.eagle.core.function.hmi.ui.widget.FusionTrafficLightView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/hmi_traffic_light_layout_margin_top"
android:visibility="gone"
app:fusionLightUser="driver"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.ui.msgbox.MsgBoxBubbleView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginTop="@dimen/dp_53"
android:layout_marginEnd="@dimen/dp_60"
/>
<View
android:id="@+id/shadowView"
android:layout_width="270dp"

View File

@@ -6,6 +6,15 @@
android:background="@drawable/bg_tab_item"
>
<View
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_183"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:background="@drawable/bg_tab_msg_box_title"
/>
<TextView
android:id="@+id/tvMsgNotice"
android:layout_width="@dimen/dp_154"
@@ -73,14 +82,16 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvMsgBoxList"
android:layout_width="match_parent"
android:layout_width="@dimen/dp_0"
android:layout_height="@dimen/dp_0"
app:layout_constraintTop_toBottomOf="@id/tvMsgIpcReport"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="@dimen/dp_20"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginStart="@dimen/dp_66"
android:layout_marginEnd="@dimen/dp_66"
android:layout_marginBottom="@dimen/dp_216"
/>
</androidx.constraintlayout.widget.ConstraintLayout>