修改分体机分享对话框大小问题
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,7 +4,7 @@
|
||||
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
|
||||
<groovy codeStyle="LEGACY" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -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<FrameLayout>(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) {
|
||||
|
||||
Reference in New Issue
Block a user