add turnlight daytime mode

This commit is contained in:
lixiaopeng
2022-04-11 15:02:38 +08:00
parent 105d29a7f7
commit 3f8bf9dd81
6 changed files with 63 additions and 1 deletions

View File

@@ -10,10 +10,12 @@ import android.view.animation.Animation
import android.view.animation.LinearInterpolator
import android.widget.ImageView
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import kotlinx.android.synthetic.main.view_turn_light_status.view.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
@@ -31,7 +33,11 @@ class TurnLightViewStatus @JvmOverloads constructor(
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
init {
LayoutInflater.from(context).inflate(R.layout.view_turn_light_status, this, true)
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
LayoutInflater.from(context).inflate(R.layout.view_turn_light_status_daytime, this, true)
} else {
LayoutInflater.from(context).inflate(R.layout.view_turn_light_status, this, true)
}
}
private var isShowNormalBg :Boolean = false

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,56 @@
<?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">
<FrameLayout
android:id="@+id/turn_light_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
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">
<ImageView
android:id="@+id/left_nor_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_marginLeft="15px"
android:src="@drawable/module_arrow_left_nor_daytime" />
<ImageView
android:id="@+id/right_nor_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginRight="15px"
android:src="@drawable/module_arrow_right_nor_daytime" />
<ImageView
android:id="@+id/left_select_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_marginLeft="13px"
android:layout_marginTop="2px"
android:src="@drawable/module_arrow_left_select_nor_daytime"
android:visibility="gone" />
<ImageView
android:id="@+id/right_select_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:layout_marginTop="2px"
android:layout_marginRight="13px"
android:src="@drawable/module_arrow_right_select_nor_daytime"
android:visibility="gone" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>