From f29b0b9b3a8ba4562d1e555d1bd4623152c11ce7 Mon Sep 17 00:00:00 2001 From: tongchenfei Date: Wed, 9 Sep 2020 14:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E4=BD=93=E6=9C=BA?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 2 +- .../share/dialog/GridFixableShareDialog.kt | 32 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 21e99e2dc0..cd77a1f062 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/GridFixableShareDialog.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/GridFixableShareDialog.kt index fa3b868954..59f98f4559 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/GridFixableShareDialog.kt +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/GridFixableShareDialog.kt @@ -27,7 +27,7 @@ import kotlin.random.Random * * @author tongchenfei */ -class GridFixableShareDialog(context:Context):BaseFloatDialog(context) { +class GridFixableShareDialog(context: Context) : BaseFloatDialog(context) { private val isShown = false private val mAnalytics: IMogoAnalytics private val mStatusManager: IMogoStatusManager @@ -35,14 +35,15 @@ class GridFixableShareDialog(context:Context):BaseFloatDialog(context) { private fun setWrapContent() { val window = window - if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) { - if (window != null) { - val lp = window.attributes - lp.width = 1024 - lp.height = 600 - window.attributes = lp - } - } else if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) { +// if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) { +// if (window != null) { +// val lp = window.attributes +// lp.width = 1024 +// lp.height = 600 +// window.attributes = lp +// } +// } else + if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) { if (window != null) { val lp = window.attributes lp.width = 1920 @@ -58,21 +59,22 @@ class GridFixableShareDialog(context:Context):BaseFloatDialog(context) { } } } - private lateinit var gridBtnManager:GridBtnManager + + private lateinit var gridBtnManager: GridBtnManager private fun initView() { Logger.d(TAG, "test-------3") setContentView(R.layout.dialog_share_with_gridlayout) setWrapContent() - gridBtnManager = GridBtnManager(context,findViewById(R.id.moduleShareBtnGridLayout)) + gridBtnManager = GridBtnManager(context, findViewById(R.id.moduleShareBtnGridLayout)) gridBtnManager.setShareClickListener { Logger.d(TAG, "share btn click: $it") if (it.poiType == IMogoTanluProvider.TYPE_SEEK_HELP) { // 发起故障求助 - Logger.d(TAG,"发起故障求助====") + Logger.d(TAG, "发起故障求助====") seekHelp(context, seekListener, true) - }else{ + } else { // 上报道路事件 - Logger.d(TAG,"上报道路事件=====") + Logger.d(TAG, "上报道路事件=====") sendShareReceiver(it.poiType) } dismiss() @@ -80,7 +82,7 @@ class GridFixableShareDialog(context:Context):BaseFloatDialog(context) { findViewById(R.id.flShareDialogContainer).setOnClickListener { dismiss() } } - private fun randomGenerateBtn(){ + private fun randomGenerateBtn() { val random = Random.nextInt(1, 10) gridBtnManager.resetContainer() for (i in 0 until random) {