Merge remote-tracking branch 'origin/dev_MogoAP_eagle-1030_211020_8.0.14' into dev_MogoAP_eagle-1030_211020_8.0.14
This commit is contained in:
@@ -284,7 +284,7 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
var floatView: NoticeFloatView? = null
|
||||
|
||||
/**
|
||||
* 展示普通公告 liyz
|
||||
* 展示普通公告
|
||||
* @param normalData
|
||||
*/
|
||||
override fun showNoticeNormal(normalData: NoticeNormalData) {
|
||||
|
||||
@@ -36,15 +36,20 @@ class NoticeCheckDialog(context: Context) : BaseFloatDialog(context) {
|
||||
}
|
||||
}
|
||||
|
||||
fun showCheckDialog(title: String, content: String) {
|
||||
/**
|
||||
* 展示详情页面
|
||||
*/
|
||||
fun showCheckDialog(title: String, dbId: String) {
|
||||
if (isShowing) {
|
||||
return
|
||||
}
|
||||
if (title.isBlank() || content.isBlank()) {
|
||||
if (title.isBlank() || dbId.isBlank()) {
|
||||
return
|
||||
}
|
||||
pushCheckTitle?.text = title
|
||||
pushCheckContent?.text = content
|
||||
|
||||
//网络请求处理数据
|
||||
|
||||
show()
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.mogo.utils.glide.GlideApp
|
||||
class NoticeFloatView constructor(
|
||||
private val context: Context
|
||||
) {
|
||||
|
||||
companion object {
|
||||
const val TYPE_TOP_VIEW = 1
|
||||
const val TYPE_WINDOW_MANAGER = 2
|
||||
@@ -55,13 +54,13 @@ class NoticeFloatView constructor(
|
||||
pushContent = findViewById(R.id.notice_push_content)
|
||||
titleIconContainer = findViewById(R.id.module_push_app_icon_title)
|
||||
|
||||
//查看结果
|
||||
//查看结果 TODO
|
||||
pushCheck.setOnClickListener {
|
||||
pushData?.let {
|
||||
if (pushCheckDialog == null) {
|
||||
pushCheckDialog = NoticeCheckDialog(ContextHolderUtil.getContext())
|
||||
}
|
||||
pushCheckDialog!!.showCheckDialog(it.title, it.content)
|
||||
pushCheckDialog!!.showCheckDialog(it.title, it.dbId)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,34 +77,6 @@ class NoticeFloatView constructor(
|
||||
pushImage.visible()
|
||||
GlideApp.with(this).load(bean.imageUrl).placeholder(R.drawable.notice_banner_default).into(pushImage)
|
||||
|
||||
// image
|
||||
// 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,
|
||||
// getQrImgWidth(),
|
||||
// getQrImgHeight()
|
||||
// )
|
||||
// UiThreadHandler.post {
|
||||
// pushImage.setImageBitmap(bmp)
|
||||
// pushImage.visible()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// content
|
||||
if (bean.content.isEmpty()) {
|
||||
pushContent.gone()
|
||||
@@ -196,7 +167,6 @@ class NoticeFloatView constructor(
|
||||
|
||||
init {
|
||||
delayClosePush = Runnable {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user