处理OBU提示信息获取

This commit is contained in:
董宏宇
2021-08-09 19:42:32 +08:00
parent a7bbce3e88
commit 77d08e2132
5 changed files with 373 additions and 278 deletions

View File

@@ -8,12 +8,12 @@ import android.view.WindowManager
import android.view.animation.OvershootInterpolator
import com.mogo.commons.mvp.MvpFragment
import com.mogo.commons.voice.AIAssist
import com.mogo.module.common.enum.WarningTypeEnum
import com.mogo.module.hmi.R
import com.mogo.module.hmi.notification.WarningFloat
import com.mogo.module.hmi.notification.anim.DefaultAnimator
import com.mogo.module.hmi.notification.enums.SidePattern
import com.mogo.module.hmi.ui.widget.ViewV2XNotification
import com.mogo.module.common.utils.WarningUtils
import kotlinx.android.synthetic.main.fragment_warning.*
/**
@@ -46,15 +46,18 @@ class MoGoWarningFragment : MvpFragment<MoGoWarningContract.View?, WaringPresent
v2xType: Int,
alertContent: String?,
ttsContent: String?,
tag: String?
tag: String?,
) {
activity?.let {
val notificationView = ViewV2XNotification(activity)
notificationView.setWarningIcon(WarningUtils.getWarningIcon(v2xType)[0] as Int)
notificationView.setWarningIcon(WarningTypeEnum.getWarningIcon(v2xType))
notificationView.setWarningContent(
alertContent ?: WarningUtils.getWarningIcon(v2xType)[1] as String
alertContent ?: WarningTypeEnum.getWarningContent(
v2xType
)
)
if (!TextUtils.isEmpty(ttsContent)) {