diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt index d282396ae4..7c6d9025ba 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeCheckDialog.kt @@ -34,6 +34,8 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) { private var playImageView: ImageView? = null private var thumbnailImageView: ImageView? = null private var mVideoUrl: String = "" + private var playErrorImageView: ImageView? = null + private var connectTextView: TextView? = null init { setContentView(R.layout.notice_dialog_check_with_accessory) @@ -45,6 +47,8 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) { pushVideo = findViewById(R.id.notice_video_layout) playImageView = findViewById(R.id.notice_video_play) thumbnailImageView = findViewById(R.id.thumbnail_image) + playErrorImageView = findViewById(R.id.load_failed_image) + connectTextView = findViewById(R.id.notice_connect) pushCheckClose?.setOnClickListener { stopLive() @@ -63,6 +67,18 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) { playImageView!!.visibility = View.GONE thumbnailImageView!!.visibility = View.GONE } + + connectTextView!!.setOnClickListener { + playImageView!!.visibility = View.GONE + thumbnailImageView!!.visibility = View.GONE + pushImageView!!.visibility = View.GONE + + connectTextView!!.visibility = View.GONE + playErrorImageView!!.visibility = View.GONE + + pushVideo!!.visibility = View.VISIBLE + playVideo(mVideoUrl) + } } @@ -99,7 +115,6 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) { playVideo(noticeNormal.videoUrl) mVideoUrl = noticeNormal.videoUrl } - show() } @@ -179,6 +194,13 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) { override fun onPlayError(url: String, vararg objects: Any) { Log.d(TAG, "onPlayError") + pushImageView?.visibility = View.GONE + pushVideo?.visibility = View.GONE + playImageView!!.visibility = View.GONE + thumbnailImageView!!.visibility = View.GONE + + connectTextView?.visibility = View.VISIBLE + playErrorImageView!!.visibility = View.VISIBLE } override fun onPrepared(url: String, vararg objects: Any) {} override fun onClickStartIcon(url: String, vararg objects: Any) {} diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_check_with_accessory.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_check_with_accessory.xml index cb2349e840..c991206472 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_check_with_accessory.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_check_with_accessory.xml @@ -109,8 +109,8 @@