[6.5.0][事件弹框] refactor: 司机屏 UI 调整;

This commit is contained in:
aibingbing
2024-07-19 18:54:43 +08:00
parent 2ef6bb6c80
commit bcddbfc338
5 changed files with 42 additions and 30 deletions

View File

@@ -142,6 +142,10 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
)
tvV2XHintContent.layoutParams = tvV2XHintContentLayoutParams
tvV2XHintContent.setTextColor(Color.parseColor("#131415"))
tvV2XHintContent.setTextSize(
TypedValue.COMPLEX_UNIT_PX,
AutoSizeUtils.dp2px(context, 28f).toFloat()
)
tvV2XHintContent.setPadding(0, 0, 0, AutoSizeUtils.dp2px(context, 28f))
val containerImageAndLiveVideoLayoutParams =
@@ -210,28 +214,32 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
containerIconHintLayoutParams.width = LayoutParams.MATCH_PARENT
containerIconHintLayoutParams.height = LayoutParams.WRAP_CONTENT
containerIconHintLayoutParams.setMargins(
AutoSizeUtils.dp2px(context, 30f),
AutoSizeUtils.dp2px(context, 31f),
AutoSizeUtils.dp2px(context, 30f),
AutoSizeUtils.dp2px(context, 30f - 22f),
AutoSizeUtils.dp2px(context, 31f - 15f),
AutoSizeUtils.dp2px(context, 30f - 22f),
0
)
containerIconHint.layoutParams = containerIconHintLayoutParams
val ivV2XImageLayoutParams = ivV2XImage.layoutParams as RelativeLayout.LayoutParams
ivV2XImageLayoutParams.width = AutoSizeUtils.dp2px(context, 84f)
ivV2XImageLayoutParams.height = AutoSizeUtils.dp2px(context, 84f)
ivV2XImageLayoutParams.width = AutoSizeUtils.dp2px(context, 84f + 22f + 22f)
ivV2XImageLayoutParams.height = AutoSizeUtils.dp2px(context, 84f + 15f + 29f)
ivV2XImage.layoutParams = ivV2XImageLayoutParams
val tvV2XHintContentLayoutParams =
tvV2XHintContent.layoutParams as RelativeLayout.LayoutParams
tvV2XHintContentLayoutParams.setMargins(
AutoSizeUtils.dp2px(context, 32f),
0,
AutoSizeUtils.dp2px(context, 15f),
AutoSizeUtils.dp2px(context, 20f - 22f),
AutoSizeUtils.dp2px(context, (42f + 15f) - (46f / 2f)),
AutoSizeUtils.dp2px(context, 5f),
0
)
tvV2XHintContent.layoutParams = tvV2XHintContentLayoutParams
tvV2XHintContent.setTextColor(Color.parseColor("#FFFFFF"))
tvV2XHintContent.setTextSize(
TypedValue.COMPLEX_UNIT_PX,
AutoSizeUtils.dp2px(context, 32f).toFloat()
)
val containerImageAndLiveVideoLayoutParams =
containerImageAndLiveVideo.layoutParams as ConstraintLayout.LayoutParams
@@ -239,7 +247,7 @@ class RoadV2NEventWindowView @JvmOverloads constructor(
containerImageAndLiveVideoLayoutParams.height = AutoSizeUtils.dp2px(context, 300f)
containerImageAndLiveVideoLayoutParams.setMargins(
AutoSizeUtils.dp2px(context, 30f),
AutoSizeUtils.dp2px(context, 30f),
AutoSizeUtils.dp2px(context, 30f - 29f),
AutoSizeUtils.dp2px(context, 30f),
0
)