fix ui problem of vip

This commit is contained in:
zhongchao
2022-10-19 11:51:55 +08:00
parent 1109917f73
commit fc71e35270
3 changed files with 6 additions and 17 deletions

View File

@@ -4,9 +4,7 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.view_vip_identification.view.*
@@ -26,13 +24,8 @@ class VipIdentificationView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
val lp = this.layoutParams as LayoutParams
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_bus).toInt()
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_bus).toInt()
} else {
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_taxi).toInt()
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_taxi).toInt()
}
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left).toInt()
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top).toInt()
this.layoutParams = lp
invalidate()
}

View File

@@ -6,11 +6,9 @@
<dimen name="module_vip_width">104px</dimen>
<dimen name="module_vip_height">104px</dimen>
<dimen name="module_vip_margin_left_bus">540px</dimen>
<dimen name="module_vip_margin_top_bus">40px</dimen>
<dimen name="module_vip_margin_left_taxi">640px</dimen>
<dimen name="module_vip_margin_top_taxi">80px</dimen>
<dimen name="module_vip_margin_left">640px</dimen>
<dimen name="module_vip_margin_top">80px</dimen>
<dimen name="module_ext_speed_width_sm_radius">30px</dimen>
<dimen name="module_ext_speed_width_big_radius">130px</dimen>

View File

@@ -14,11 +14,9 @@
<dimen name="module_vip_width">104px</dimen>
<dimen name="module_vip_height">104px</dimen>
<dimen name="module_vip_margin_left_bus">380px</dimen>
<dimen name="module_vip_margin_top_bus">40px</dimen>
<dimen name="module_vip_margin_left_taxi">380px</dimen>
<dimen name="module_vip_margin_top_taxi">40px</dimen>
<dimen name="module_vip_margin_left">380px</dimen>
<dimen name="module_vip_margin_top">40px</dimen>
<dimen name="module_ext_speed_width_sm_radius">20px</dimen>
<dimen name="module_ext_speed_width_big_radius">110px</dimen>