add bus brake white ui
This commit is contained in:
@@ -10,7 +10,9 @@ import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
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 kotlinx.android.synthetic.main.view_brake_light_status.view.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
@@ -28,7 +30,12 @@ class BrakeViewStatus @JvmOverloads constructor(
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_brake_light_status, this, true)
|
||||
//bus乘客端
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_brake_light_status_daytime, this, true)
|
||||
} else {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_brake_light_status, this, true)
|
||||
}
|
||||
}
|
||||
|
||||
private var isBrake: Boolean = false
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/brakelight_bg_color_daytime" />
|
||||
<corners android:radius="@dimen/turnlight_bg_corner" />
|
||||
</shape>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/brakelight_width_daytime"
|
||||
android:layout_height="@dimen/brakelight_height_daytime"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_brake"
|
||||
android:layout_width="@dimen/brakelight_width_daytime"
|
||||
android:layout_height="@dimen/brakelight_height_daytime"
|
||||
android:background="@drawable/brakelight_background_daytime"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_brake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/bus_shache_nor_daytime"
|
||||
android:layout_marginLeft="15px"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brake"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="刹车中"
|
||||
android:textColor="#2D3E5F"
|
||||
android:textSize="34px"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/image_brake" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -46,6 +46,7 @@
|
||||
<color name="dialog_bg_color">#3B4577</color>
|
||||
|
||||
<color name="turnlight_bg_color">#000000</color>
|
||||
<color name="brakelight_bg_color_daytime">#E6FFFFFF</color>
|
||||
|
||||
<color name="hmi_traffic_light_red_color_up">#FFFFA28B</color>
|
||||
<color name="hmi_traffic_light_red_color_down">#FFDA1100</color>
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
<dimen name="turnlight_height">120px</dimen>
|
||||
<dimen name="brakelight_width">460px</dimen>
|
||||
<dimen name="brakelight_height">120px</dimen>
|
||||
<dimen name="brakelight_width_daytime">220px</dimen>
|
||||
<dimen name="brakelight_height_daytime">120px</dimen>
|
||||
|
||||
<dimen name="hmi_traffic_light_layout_width">225px</dimen>
|
||||
<dimen name="hmi_traffic_light_layout_height">154px</dimen>
|
||||
|
||||
Reference in New Issue
Block a user