fixed conflict
This commit is contained in:
@@ -61,6 +61,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_network
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
// implementation rootProject.ext.dependencies.mogo_core_res
|
||||
} else {
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':services:mogo-service-api')
|
||||
@@ -70,6 +71,7 @@ dependencies {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-api')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
// implementation project(':core:mogo-core-res')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,5 +27,14 @@
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<!--公告广播-->
|
||||
<receiver android:name="com.mogo.eagle.core.function.hmi.receiver.NoticeNormalBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.hmi.notice.normal" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.mogo.eagle.core.function.hmi.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
/**
|
||||
* 用于普通云公告的测试
|
||||
*
|
||||
* @author lixiaopeng
|
||||
*/
|
||||
class NoticeNormalBroadcastReceiver : BroadcastReceiver() {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "NoticeNormalBroadcastReceiver"
|
||||
private var mMogoServiceApis: IMogoServiceApis? = null
|
||||
private var mIMoGoWaringProvider: IMoGoWaringProvider? = null
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
try {
|
||||
mMogoServiceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS)
|
||||
.navigation(context) as IMogoServiceApis
|
||||
mIMoGoWaringProvider = mMogoServiceApis!!.waringProviderApi
|
||||
|
||||
// 分发场景
|
||||
dispatchShowWaring("11", "官方公告", "测试普通云公告", "www")
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private fun dispatchShowWaring(
|
||||
id: String,
|
||||
titleTv: String,
|
||||
contentTv: String,
|
||||
imageUrl: String
|
||||
) {
|
||||
|
||||
val data = NoticeNormalData()
|
||||
data.dbId = id
|
||||
data.imageUrl = imageUrl
|
||||
data.title = titleTv
|
||||
data.content = contentTv
|
||||
|
||||
mIMoGoWaringProvider!!.showNoticeNormalData(data)
|
||||
}
|
||||
}
|
||||
@@ -4,23 +4,33 @@ import android.content.Context
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
//import com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog
|
||||
|
||||
/**
|
||||
* 点击查看对话框,需要做接口的请求 TODO
|
||||
*
|
||||
*/
|
||||
class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) {
|
||||
|
||||
private var pushCheckClose: ImageView? = null
|
||||
private var pushCheckTitle: TextView? = null
|
||||
private var pushCheckContent: TextView? = null
|
||||
private var pushImageView: ImageView? = null
|
||||
// private var pushVideo: SimpleVideoPlayer? = null
|
||||
|
||||
init {
|
||||
setContentView(R.layout.notice_push_dialog_check)
|
||||
setContentView(R.layout.notice_dialog_check_with_accessory) //notice_module_dialog_check
|
||||
setCanceledOnTouchOutside(true)
|
||||
pushCheckClose = findViewById(R.id.module_push_dialog_close)
|
||||
pushCheckTitle = findViewById(R.id.module_push_dialog_title)
|
||||
pushCheckTitle = findViewById(R.id.module_push_dialog_acc_title)
|
||||
pushCheckContent = findViewById(R.id.module_push_dialog_content)
|
||||
pushImageView = findViewById(R.id.notice_image)
|
||||
// pushVideo = findViewById(R.id.notice_video_layout)
|
||||
|
||||
// GlideApp.with(context!!).load(headImgUrl)
|
||||
// .placeholder(R.mipmap.module_carchatting_default_head_img).circleCrop().into(pushImageView)
|
||||
|
||||
pushCheckClose?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
@@ -37,4 +47,8 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) {
|
||||
pushCheckContent?.text = content
|
||||
show()
|
||||
}
|
||||
|
||||
//展示相关数据,播放视频 TODO
|
||||
|
||||
|
||||
}
|
||||
@@ -3,16 +3,15 @@ package com.mogo.eagle.core.function.hmi.ui.notice
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.LayoutRes
|
||||
import com.mogo.commons.context.ContextHolderUtil
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.roundimage.RoundedImageView
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.getApis
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.gone
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.visible
|
||||
@@ -43,17 +42,17 @@ class NoticeFloatView constructor(
|
||||
PushViewController {
|
||||
private lateinit var titleIconContainer: View
|
||||
private lateinit var pushTitle: TextView
|
||||
private lateinit var pushImage: RoundedImageView
|
||||
private lateinit var pushImage: ImageView
|
||||
private lateinit var pushContent: TextView
|
||||
private lateinit var pushCheck: TextView
|
||||
private var pushData: NoticeNormalData? = null
|
||||
|
||||
override fun inflateView(layoutId: Int) {
|
||||
LayoutInflater.from(context).inflate(layoutId, this, true)
|
||||
pushTitle = findViewById(R.id.module_push_title)
|
||||
pushCheck = findViewById(R.id.module_push_check)
|
||||
pushImage = findViewById(R.id.module_push_image)
|
||||
pushContent = findViewById(R.id.module_push_content)
|
||||
pushTitle = findViewById(R.id.notice_push_title)
|
||||
pushCheck = findViewById(R.id.notice_push_banner_check)
|
||||
pushImage = findViewById(R.id.notice_push_style_image)
|
||||
pushContent = findViewById(R.id.notice_push_content)
|
||||
titleIconContainer = findViewById(R.id.module_push_app_icon_title)
|
||||
|
||||
//查看结果
|
||||
@@ -72,21 +71,28 @@ class NoticeFloatView constructor(
|
||||
// title
|
||||
pushTitle.text = bean.title
|
||||
|
||||
val params = pushImage.layoutParams
|
||||
params.width = getImgWidth()
|
||||
params.height = getImgHeight()
|
||||
pushImage.layoutParams = params
|
||||
pushImage.visible()
|
||||
GlideApp.with(this).load(bean.imageUrl).placeholder(R.drawable.notice_banner_default).into(pushImage)
|
||||
|
||||
// image
|
||||
if (bean.imageUrl.isEmpty() && bean.QRCode.isEmpty()) {
|
||||
pushImage.gone()
|
||||
} else if (bean.imageUrl.isNotEmpty()) {
|
||||
val params = pushImage.layoutParams
|
||||
params.width = getImgWidth()
|
||||
params.height = getImgHeight()
|
||||
pushImage.layoutParams = params
|
||||
pushImage.visible()
|
||||
GlideApp.with(this).load(bean.imageUrl).into(pushImage)
|
||||
} else if (bean.QRCode.isNotEmpty()) {
|
||||
val params = pushImage.layoutParams
|
||||
params.width = getQrImgWidth()
|
||||
params.height = getQrImgHeight()
|
||||
pushImage.layoutParams = params
|
||||
// if (bean.imageUrl.isEmpty()) {
|
||||
// pushImage.gone()
|
||||
// } else if (bean.imageUrl.isNotEmpty()) {
|
||||
// val params = pushImage.layoutParams
|
||||
// params.width = getImgWidth()
|
||||
// params.height = getImgHeight()
|
||||
// pushImage.layoutParams = params
|
||||
// pushImage.visible()
|
||||
// GlideApp.with(this).load(bean.imageUrl).placeholder(R.drawable.notice_banner_default).into(pushImage)
|
||||
// } else if (bean.QRCode.isNotEmpty()) {
|
||||
// val params = pushImage.layoutParams
|
||||
// params.width = getQrImgWidth()
|
||||
// params.height = getQrImgHeight()
|
||||
// pushImage.layoutParams = params
|
||||
// ThreadPoolService.execute {
|
||||
// val bmp = stringConverterBitmap(
|
||||
// bean.QRCode,
|
||||
@@ -98,7 +104,7 @@ class NoticeFloatView constructor(
|
||||
// pushImage.visible()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// }
|
||||
|
||||
// content
|
||||
if (bean.content.isEmpty()) {
|
||||
@@ -135,7 +141,7 @@ class NoticeFloatView constructor(
|
||||
private val mTopViewManager: IMogoTopViewManager = getApis(context).topViewManager
|
||||
|
||||
init {
|
||||
inflateView(R.layout.notice_module_push_item)
|
||||
inflateView(R.layout.notice_push_top_banner)
|
||||
}
|
||||
|
||||
private var topViewStatusListener = object : IMogoTopViewStatusListener {
|
||||
@@ -195,7 +201,6 @@ class NoticeFloatView constructor(
|
||||
}
|
||||
|
||||
fun pushBeanChanged(bean: NoticeNormalData?) {
|
||||
Log.d("liyz", "NoticeFloatVideo pushBeanChanged -----> bean = " + bean)
|
||||
uiHandler.post {
|
||||
uiHandler.removeCallbacks(delayClosePush)
|
||||
if (bean == null) {
|
||||
|
||||
@@ -39,22 +39,53 @@
|
||||
android:layout_marginRight="@dimen/dp_150"
|
||||
android:layout_marginBottom="@dimen/dp_56"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:gravity="left"
|
||||
android:maxLines="2"
|
||||
android:text=" 官方公告测试数据,当前测试数据属于查看UI状态,多于两行是怎么显示的,多余的内容是都是省略号显示的呢,看一下测试数据的"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_50"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<!--中间图片-->
|
||||
<ImageView
|
||||
android:id="@+id/back_image"
|
||||
android:id="@+id/notice_image"
|
||||
android:layout_width="@dimen/module_push_dialog_check_acc_image_width"
|
||||
android:layout_height="@dimen/module_push_dialog_check_acc_image__height"
|
||||
android:layout_marginLeft="@dimen/dp_150"
|
||||
android:layout_marginTop="@dimen/dp_52"
|
||||
android:layout_marginRight="@dimen/dp_150"
|
||||
android:background="@color/module_commons_FFF_333"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_push_dialog_bottom_title"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_push_dialog_acc_title" />
|
||||
|
||||
<!--中间视频-->
|
||||
<!-- <com.mogo.eagle.core.widget.media.video.SimpleVideoPlayer-->
|
||||
<!-- android:id="@+id/notice_video_layout"-->
|
||||
<!-- android:layout_width="@dimen/module_push_dialog_check_acc_image_width"-->
|
||||
<!-- android:layout_height="@dimen/module_push_dialog_check_acc_image__height"-->
|
||||
<!-- android:layout_marginLeft="@dimen/dp_150"-->
|
||||
<!-- android:layout_marginTop="@dimen/dp_52"-->
|
||||
<!-- android:layout_marginRight="@dimen/dp_150"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toTopOf="@+id/module_push_dialog_bottom_title"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/module_push_dialog_acc_title" />-->
|
||||
|
||||
<!--加载失败默认图-->
|
||||
<ImageView
|
||||
android:id="@+id/load_failed_image"
|
||||
android:layout_width="@dimen/module_push_dialog_check_acc_image_width"
|
||||
android:layout_height="@dimen/module_push_dialog_check_acc_image__height"
|
||||
android:layout_marginLeft="@dimen/dp_150"
|
||||
android:layout_marginTop="@dimen/dp_52"
|
||||
android:layout_marginRight="@dimen/dp_150"
|
||||
android:src="@drawable/notice_unsuccess_image"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_push_dialog_bottom_title"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -70,9 +101,9 @@
|
||||
android:text="连接"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_42"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/back_image"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/load_failed_image"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -3,8 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/module_push_dialog_check_width"
|
||||
android:layout_height="@dimen/module_push_dialog_check_height"
|
||||
android:background="@drawable/module_push_dialog_check_background">
|
||||
android:layout_height="@dimen/module_push_dialog_check_height">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_push_dialog_close"
|
||||
Reference in New Issue
Block a user