[6.7.0][数据上车] refactor: B2乘客端通用事件弹框 间距调整;
This commit is contained in:
@@ -225,6 +225,8 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private fun setB2PassengerScreenView() {
|
||||
// 对比taxi乘客屏 按比例缩放
|
||||
// 25 = 390/580 * 37
|
||||
val layoutParam =
|
||||
roundRoadV2NEventContainer.layoutParams as ConstraintLayout.LayoutParams
|
||||
layoutParam.width = AutoSizeUtils.dp2px(
|
||||
@@ -234,7 +236,7 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
layoutParam.setMargins(
|
||||
0,
|
||||
0,
|
||||
AutoSizeUtils.dp2px(context, 39f - 37f),
|
||||
AutoSizeUtils.dp2px(context, 39f - 25f),
|
||||
0
|
||||
)
|
||||
roundRoadV2NEventContainer.layoutParams = layoutParam
|
||||
@@ -242,8 +244,8 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
context,
|
||||
R.drawable.hmi_v2n_event_bg_passenger
|
||||
)
|
||||
//乘客屏 背景图 右边带了 37px 渐变
|
||||
val padding = AutoSizeUtils.dp2px(context, 37f)
|
||||
//乘客屏 背景图 右边带了 25px 渐变
|
||||
val padding = AutoSizeUtils.dp2px(context, 25f)
|
||||
roundRoadV2NEventContainer.setPadding(padding, padding, padding, padding)
|
||||
|
||||
val containerIconHintLayoutParams =
|
||||
@@ -251,8 +253,8 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
containerIconHintLayoutParams.width = LayoutParams.MATCH_PARENT
|
||||
containerIconHintLayoutParams.height = LayoutParams.WRAP_CONTENT
|
||||
containerIconHintLayoutParams.setMargins(
|
||||
AutoSizeUtils.dp2px(context, 20f - 19.4f), //乘客屏icon ivV2XImage带了白边, 高度、margin需要计算调整
|
||||
AutoSizeUtils.dp2px(context, 27f - 10.7f),
|
||||
AutoSizeUtils.dp2px(context, 20f - 19.4f * (54f / 69f)), //乘客屏icon ivV2XImage带了白边, 高度、margin需要计算调整
|
||||
AutoSizeUtils.dp2px(context, 27f - 10.7f * (54f / 69f)),
|
||||
AutoSizeUtils.dp2px(context, 20f),
|
||||
0
|
||||
)
|
||||
@@ -262,20 +264,20 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
ivV2XImageLayoutParams.width =
|
||||
AutoSizeUtils.dp2px(
|
||||
context,
|
||||
56f + 14f + 14f
|
||||
56f + (14f + 14f) * (54f / 69f) // 对比taxi乘客屏 按比例缩放
|
||||
) //乘客屏icon ivV2XImage带了白边, 高度、margin需要计算调整
|
||||
ivV2XImageLayoutParams.height =
|
||||
AutoSizeUtils.dp2px(
|
||||
context,
|
||||
56f + 14f + 14f
|
||||
56f + (14f + 14f) * (54f / 69f) // 对比taxi乘客屏 按比例缩放
|
||||
) //乘客屏icon ivV2XImage带了白边, 高度、margin需要计算调整
|
||||
ivV2XImage.layoutParams = ivV2XImageLayoutParams
|
||||
|
||||
val tvV2XHintContentLayoutParams =
|
||||
tvV2XHintContent.layoutParams as RelativeLayout.LayoutParams
|
||||
tvV2XHintContentLayoutParams.setMargins(
|
||||
AutoSizeUtils.dp2px(context, 21f - 19.7f), //乘客屏icon ivV2XImage带了白边, 高度、margin需要计算调整
|
||||
AutoSizeUtils.dp2px(context, (28f + 14f) - (40f / 2f)),
|
||||
AutoSizeUtils.dp2px(context, 21f - 19.7f * (54f / 69f)), //乘客屏icon ivV2XImage带了白边, 高度、margin需要计算调整
|
||||
AutoSizeUtils.dp2px(context, (20f + 14f * (54f / 69f)) - (40f / 2f)),
|
||||
AutoSizeUtils.dp2px(context, 5f),
|
||||
0
|
||||
)
|
||||
@@ -290,11 +292,11 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
|
||||
val containerImageAndLiveVideoLayoutParams =
|
||||
containerImageAndLiveVideo.layoutParams as ConstraintLayout.LayoutParams
|
||||
containerImageAndLiveVideoLayoutParams.width = AutoSizeUtils.dp2px(context, 350f + 18f) //乘客屏视频加载里面背景切图包含了白边
|
||||
containerImageAndLiveVideoLayoutParams.width = AutoSizeUtils.dp2px(context, 350f + 18f * (350f / 480f)) //乘客屏视频加载里面背景切图包含了白边
|
||||
containerImageAndLiveVideoLayoutParams.height = AutoSizeUtils.dp2px(context, 197f)
|
||||
containerImageAndLiveVideoLayoutParams.setMargins(
|
||||
AutoSizeUtils.dp2px(context, 20f),
|
||||
AutoSizeUtils.dp2px(context, 23f - 14f), //乘客屏icon ivV2XImage带了白边
|
||||
AutoSizeUtils.dp2px(context, 23f - 14f * (54f / 69f)), //乘客屏icon ivV2XImage带了白边
|
||||
AutoSizeUtils.dp2px(context, 20f),
|
||||
0
|
||||
)
|
||||
@@ -307,9 +309,9 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
|
||||
tvV2XTimeStrLayoutParams.width = LayoutParams.MATCH_PARENT
|
||||
tvV2XTimeStrLayoutParams.height = LayoutParams.WRAP_CONTENT
|
||||
tvV2XTimeStrLayoutParams.setMargins(
|
||||
AutoSizeUtils.dp2px(context, 20f),
|
||||
AutoSizeUtils.dp2px(context, 16f),
|
||||
AutoSizeUtils.dp2px(context, 20f),
|
||||
AutoSizeUtils.dp2px(context, 19f),
|
||||
AutoSizeUtils.dp2px(context, 16.6f),
|
||||
AutoSizeUtils.dp2px(context, 19f),
|
||||
AutoSizeUtils.dp2px(context, 26f)
|
||||
)
|
||||
tvV2XTimeStr.layoutParams = tvV2XTimeStrLayoutParams
|
||||
|
||||
Reference in New Issue
Block a user