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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user