fix ui problem of vip
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user