[6.7.0]Tab消息盒子

This commit is contained in:
xuxinchao
2024-09-20 18:23:12 +08:00
parent 4dc105c5d4
commit b636f1f6f5
4 changed files with 98 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
import kotlinx.android.synthetic.main.view_bone_tab.view.carInfoTabView
import kotlinx.android.synthetic.main.view_bone_tab.view.msgBoxTabView
import kotlinx.android.synthetic.main.view_bone_tab.view.tabSwitchCarInfo
import kotlinx.android.synthetic.main.view_bone_tab.view.tabSwitchMore
import kotlinx.android.synthetic.main.view_bone_tab.view.tabSwitchMsgBox
@@ -114,8 +115,9 @@ class BoneTabLayout @JvmOverloads constructor(
tabSwitchMsgBox.switchTab(check)
if (check) {
tabSwitchMsgBox.updateNotice(false)
msgBoxTabView.visibility = VISIBLE
} else {
msgBoxTabView.visibility = GONE
}
}

View File

@@ -32,7 +32,7 @@ import org.greenrobot.eventbus.ThreadMode
* @description 司机端消息盒子打开列表视图
* @since: 2022/11/25
*/
class MsgBoxListTabView @JvmOverloads constructor(
class MsgBoxTabView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
@@ -40,10 +40,10 @@ class MsgBoxListTabView @JvmOverloads constructor(
IOrderListener {
init {
LayoutInflater.from(context).inflate(R.layout.layout_driver_msg_box_list, this, true)
LayoutInflater.from(context).inflate(R.layout.layout_msg_box_tab, this, true)
initView()
}
private val TAG = "DriverMsgBoxListView"
private val TAG = "MsgBoxTabView"
private var noticeList: ArrayList<MsgBoxBean> ?= null //通知消息列表
private var fmList: ArrayList<MsgBoxBean> ?= ArrayList() //FM信息消息列表
private var ipcReportList: ArrayList<MsgBoxBean> ?= null //车辆系统信息消息列表

View File

@@ -0,0 +1,81 @@
<?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_880"
android:layout_height="@dimen/dp_997"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/bg_msg_box"
>
<TextView
android:id="@+id/tvMsgNotice"
android:layout_width="@dimen/dp_154"
android:layout_height="@dimen/dp_113"
android:text="@string/msg_box_title_notice"
android:textColor="@color/msg_box_title_color"
android:textSize="@dimen/sp_40"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginStart="@dimen/dp_26"
android:paddingTop="@dimen/dp_38"
android:gravity="center_horizontal"
/>
<TextView
android:id="@+id/tvMsgFm"
android:layout_width="@dimen/dp_154"
android:layout_height="@dimen/dp_113"
android:text="@string/msg_box_title_fm"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/sp_40"
android:gravity="center_horizontal"
android:paddingTop="@dimen/dp_38"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/tvMsgNotice"
app:layout_constraintRight_toLeftOf="@id/tvMsgIpcReport"
/>
<TextView
android:id="@+id/tvMsgIpcReport"
android:layout_width="@dimen/dp_154"
android:layout_height="@dimen/dp_113"
android:text="@string/msg_box_title_report"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/sp_38"
android:gravity="center_horizontal"
android:paddingTop="@dimen/dp_38"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/tvMsgFm"
app:layout_constraintRight_toLeftOf="@id/tvMsgBadCase"
/>
<TextView
android:id="@+id/tvMsgBadCase"
android:layout_width="@dimen/dp_154"
android:layout_height="@dimen/dp_113"
android:text="@string/msg_box_title_bad_case"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/sp_40"
android:gravity="center_horizontal"
android:paddingTop="@dimen/dp_38"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginEnd="@dimen/dp_26"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvMsgBoxList"
android:layout_width="match_parent"
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"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -22,6 +22,17 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.eagle.core.function.hmi.bone.tab.MsgBoxTabView
android:id="@+id/msgBoxTabView"
android:layout_width="@dimen/dp_960"
android:layout_height="@dimen/dp_1137"
android:layout_marginStart="@dimen/dp_40"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<com.mogo.eagle.core.function.hmi.bone.tab.ToolKitTabView
android:id="@+id/toolKitTabView"
android:layout_width="@dimen/dp_960"