[8.0.0]Taxi乘客屏自车感知红绿灯大小调整
This commit is contained in:
@@ -166,14 +166,14 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
if(trafficLightUser==1){
|
||||
//乘客屏
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width = context.resources.getDimension(R.dimen.dp_325).toInt()
|
||||
lp.width = context.resources.getDimension(R.dimen.dp_244).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightSourceTV?.visibility = VISIBLE
|
||||
mLightSourceDivider!!.visibility = VISIBLE
|
||||
mLightTimeTVP?.visibility = GONE
|
||||
mLightSourceTV?.setPadding(0, 0, 75, 0)
|
||||
mLightIconBG?.layoutParams?.width =
|
||||
context.resources.getDimension(R.dimen.dp_310).toInt()
|
||||
context.resources.getDimension(R.dimen.dp_233).toInt()
|
||||
}else{
|
||||
//司机屏
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
@@ -382,14 +382,14 @@ class SingleTrafficLightView @JvmOverloads constructor(
|
||||
//乘客屏
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
lp.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_layout_width).toInt()
|
||||
context.resources.getDimension(R.dimen.dp_300).toInt()
|
||||
this.layoutParams = lp
|
||||
mLightTimeTVP?.visibility = View.VISIBLE
|
||||
mLightSourceDivider?.visibility = View.VISIBLE
|
||||
mLightSourceTV?.visibility = View.VISIBLE
|
||||
mLightSourceTV?.setPadding(0, 0, 0, 0)
|
||||
mLightIconBG?.layoutParams?.width =
|
||||
context.resources.getDimension(R.dimen.hmi_traffic_light_bus_bg_width).toInt()
|
||||
context.resources.getDimension(R.dimen.dp_288).toInt()
|
||||
}else{
|
||||
//司机屏
|
||||
val lp = this.layoutParams as MarginLayoutParams
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/hmi_traffic_light_bus_layout_width"
|
||||
android:layout_height="@dimen/hmi_traffic_light_layout_height"
|
||||
android:layout_width="@dimen/dp_300"
|
||||
android:layout_height="@dimen/dp_115"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/hmi_traffic_light_bg"
|
||||
android:layout_width="@dimen/hmi_traffic_light_bus_bg_width"
|
||||
android:layout_height="@dimen/hmi_traffic_light_bg_height"
|
||||
android:layout_marginStart="@dimen/hmi_traffic_light_bg_margin_left"
|
||||
android:layout_marginTop="@dimen/hmi_traffic_light_bg_margin_top"
|
||||
android:layout_width="@dimen/dp_288"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginStart="@dimen/dp_11"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/hmi_traffic_light_iv"
|
||||
android:layout_width="@dimen/dp_116"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:layout_width="@dimen/dp_87"
|
||||
android:layout_height="@dimen/dp_87"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/hmi_traffic_light_time_size"
|
||||
android:textSize="@dimen/sp_45"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/hmi_traffic_light_divider"
|
||||
android:layout_marginStart="@dimen/dp_116"
|
||||
android:layout_marginStart="@dimen/dp_87"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -46,22 +46,22 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="自车感知"
|
||||
android:textSize="@dimen/hmi_traffic_light_source_size"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_22"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/hmi_traffic_light_divider"
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/hmi_traffic_light_source"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_19"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user